Skip to content

Commit 20a74ee

Browse files
committed
clean object check & update doc-strings
1 parent 8067955 commit 20a74ee

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

asv_bench/benchmarks/io/parsers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
pass
1111

1212

13-
class DoesStringLookLikeDatetime(object):
13+
class DoesStringLookLikeDatetime:
1414

1515
params = (["2Q2005", "0.0", "10000"],)
1616
param_names = ["value"]
@@ -23,7 +23,7 @@ def time_check_datetimes(self, value):
2323
_does_string_look_like_datetime(obj)
2424

2525

26-
class ConcatDateCols(object):
26+
class ConcatDateCols:
2727

2828
params = ([1234567890, "AAAA"], [1, 2])
2929
param_names = ["value", "dim"]

asv_bench/benchmarks/reshape.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def time_qcut_datetime(self, bins):
240240
pd.qcut(self.datetime_series, bins)
241241

242242

243-
class Explode(object):
243+
class Explode
244244
param_names = ["n_rows", "max_list_length"]
245245
params = [[100, 1000, 10000], [3, 5, 10]]
246246

@@ -250,10 +250,7 @@ def setup(self, n_rows, max_list_length):
250250
self.series = pd.Series(data)
251251

252252
def time_explode(self, n_rows, max_list_length):
253-
try:
254-
self.series.explode()
255-
except AttributeError:
256-
pass
253+
self.series.explode()
257254

258255

259256
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/series_methods.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def time_series_datetimeindex_repr(self):
219219
getattr(self.s, "a", None)
220220

221221

222-
class All(object):
222+
class All:
223223

224224
params = [[10 ** 3, 10 ** 6], ["fast", "slow"]]
225225
param_names = ["N", "case"]
@@ -232,7 +232,7 @@ def time_all(self, N, case):
232232
self.s.all()
233233

234234

235-
class Any(object):
235+
class Any:
236236

237237
params = [[10 ** 3, 10 ** 6], ["fast", "slow"]]
238238
param_names = ["N", "case"]
@@ -245,7 +245,7 @@ def time_any(self, N, case):
245245
self.s.any()
246246

247247

248-
class NanOps(object):
248+
class NanOps:
249249

250250
params = [
251251
[

asv_bench/benchmarks/timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def time_format_YYYYMMDD(self):
293293
to_datetime(self.stringsD, format="%Y%m%d")
294294

295295

296-
class ToDatetimeCacheSmallCount(object):
296+
class ToDatetimeCacheSmallCount:
297297

298298
params = ([True, False], [50, 500, 5000, 100000])
299299
param_names = ["cache", "count"]

ci/code_checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
156156
RET=$(($RET + $?)) ; echo $MSG "DONE"
157157

158158
MSG='Check for python2 new-style classes and for empty parentheses' ; echo $MSG
159-
invgrep -R --include="*.py" --include="*.pyx" -E "class\s\S*\((object)?\):" pandas scripts
159+
invgrep -R --include="*.py" --include="*.pyx" -E "class\s\S*\((object)?\):" pandas asv_bench/benchmarks scripts
160160
RET=$(($RET + $?)) ; echo $MSG "DONE"
161161

162162
MSG='Check for backticks incorrectly rendering because of missing spaces' ; echo $MSG

pandas/core/frame.py

+1
Original file line numberDiff line numberDiff line change
@@ -6352,6 +6352,7 @@ def unstack(self, level=-1, fill_value=None):
63526352
%(other)s
63536353
pivot_table
63546354
DataFrame.pivot
6355+
Series.explode
63556356
63566357
Examples
63576358
--------

pandas/core/series.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -3644,12 +3644,14 @@ def explode(self) -> "Series":
36443644
36453645
Returns
36463646
-------
3647-
exploded: Series
3647+
Series
3648+
exploded lists to rows; index will be duplicated for these rows
36483649
36493650
See Also
36503651
--------
3651-
Series.str.split: Split string values on specified separator.
3652-
Series.unstack: Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
3652+
Series.str.split : Split string values on specified separator.
3653+
Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
3654+
DataFrame.melt : Unpivot a DataFrame from wide format to long format
36533655
36543656
Notes
36553657
-----

0 commit comments

Comments
 (0)