Skip to content

Commit

Permalink
DOC: Updated resample.py and groupby.py to fix SA04 Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nagesh-kumar-abinbev committed Oct 18, 2020
1 parent 75a5fa7 commit 6bffc95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class providing the base-class of operations.
_common_see_also = """
See Also
--------
Series.%(name)s
DataFrame.%(name)s
Series.%(name)s : Apply a function %(name)s to a Series.
DataFrame.%(name)s : Apply a function %(name)s to each row or column of a DataFrame.
"""

_apply_docs = dict(
Expand Down
23 changes: 13 additions & 10 deletions pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __iter__(self):
See Also
--------
GroupBy.__iter__
GroupBy.__iter__ : Generator yielding sequence of (name, subset object) for each group
"""
self._set_binner()
return super().__iter__()
Expand Down Expand Up @@ -235,9 +235,9 @@ def pipe(self, func, *args, **kwargs):
"""
See Also
--------
DataFrame.groupby.aggregate
DataFrame.resample.transform
DataFrame.aggregate
DataFrame.groupby.aggregate : Aggregate using callable, string, dict, or list of string/callables
DataFrame.resample.transform : Transforms the Series on each group based on the given function.
DataFrame.aggregate: Aggregate using one or more operations over the specified axis.
"""
)

Expand Down Expand Up @@ -453,8 +453,8 @@ def pad(self, limit=None):
See Also
--------
Series.fillna
DataFrame.fillna
Series.fillna: Fill NA/NaN values using the specified method.
DataFrame.fillna: Fill NA/NaN values using the specified method.
"""
return self._upsample("pad", limit=limit)

Expand Down Expand Up @@ -828,8 +828,8 @@ def asfreq(self, fill_value=None):
See Also
--------
Series.asfreq
DataFrame.asfreq
Series.asfreq: Convert TimeSeries to specified frequency.
DataFrame.asfreq: Convert TimeSeries to specified frequency.
"""
return self._upsample("asfreq", fill_value=fill_value)

Expand Down Expand Up @@ -915,8 +915,11 @@ def quantile(self, q=0.5, **kwargs):
See Also
--------
Series.quantile
Return a series, where the index is q and the values are the quantiles
DataFrame.quantile
Return a DataFrame, where the columns are the columns of self, and the values are the quantiles.
DataFrameGroupBy.quantile
Return a DataFrame, where the coulmns are groupby columns, and the values are its quantiles.
"""
return self._downsample("quantile", q=q, **kwargs)

Expand Down Expand Up @@ -1072,7 +1075,7 @@ def _upsample(self, method, limit=None, fill_value=None):
See Also
--------
.fillna
.fillna: Fill NA/NaN values using the specified method.
"""
self._set_binner()
Expand Down Expand Up @@ -1208,7 +1211,7 @@ def _upsample(self, method, limit=None, fill_value=None):
See Also
--------
.fillna
.fillna: Fill NA/NaN values using the specified method.
"""
# we may need to actually resample as if we are timestamps
Expand Down

0 comments on commit 6bffc95

Please sign in to comment.