Skip to content

Commit

Permalink
clean object check & update doc-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Jul 7, 2019
1 parent 8067955 commit 20a74ee
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions asv_bench/benchmarks/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pass


class DoesStringLookLikeDatetime(object):
class DoesStringLookLikeDatetime:

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


class ConcatDateCols(object):
class ConcatDateCols:

params = ([1234567890, "AAAA"], [1, 2])
param_names = ["value", "dim"]
Expand Down
7 changes: 2 additions & 5 deletions asv_bench/benchmarks/reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def time_qcut_datetime(self, bins):
pd.qcut(self.datetime_series, bins)


class Explode(object):
class Explode
param_names = ["n_rows", "max_list_length"]
params = [[100, 1000, 10000], [3, 5, 10]]

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

def time_explode(self, n_rows, max_list_length):
try:
self.series.explode()
except AttributeError:
pass
self.series.explode()


from .pandas_vb_common import setup # noqa: F401
6 changes: 3 additions & 3 deletions asv_bench/benchmarks/series_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def time_series_datetimeindex_repr(self):
getattr(self.s, "a", None)


class All(object):
class All:

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


class Any(object):
class Any:

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


class NanOps(object):
class NanOps:

params = [
[
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def time_format_YYYYMMDD(self):
to_datetime(self.stringsD, format="%Y%m%d")


class ToDatetimeCacheSmallCount(object):
class ToDatetimeCacheSmallCount:

params = ([True, False], [50, 500, 5000, 100000])
param_names = ["cache", "count"]
Expand Down
2 changes: 1 addition & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
RET=$(($RET + $?)) ; echo $MSG "DONE"

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

MSG='Check for backticks incorrectly rendering because of missing spaces' ; echo $MSG
Expand Down
1 change: 1 addition & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6352,6 +6352,7 @@ def unstack(self, level=-1, fill_value=None):
%(other)s
pivot_table
DataFrame.pivot
Series.explode
Examples
--------
Expand Down
8 changes: 5 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3644,12 +3644,14 @@ def explode(self) -> "Series":
Returns
-------
exploded: Series
Series
exploded lists to rows; index will be duplicated for these rows
See Also
--------
Series.str.split: Split string values on specified separator.
Series.unstack: Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
Series.str.split : Split string values on specified separator.
Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
DataFrame.melt : Unpivot a DataFrame from wide format to long format
Notes
-----
Expand Down

0 comments on commit 20a74ee

Please sign in to comment.