-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fix PR06 errors in Series docstrings (#28253) #28288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2313,7 +2313,7 @@ def to_json( | |
floating point values. | ||
force_ascii : bool, default True | ||
Force encoded string to be ASCII. | ||
date_unit : string, default 'ms' (milliseconds) | ||
date_unit : str, default 'ms' (milliseconds) | ||
The time unit to encode to, governs timestamp and ISO8601 | ||
precision. One of 's', 'ms', 'us', 'ns' for second, millisecond, | ||
microsecond, and nanosecond respectively. | ||
|
@@ -2533,7 +2533,7 @@ def to_msgpack(self, path_or_buf=None, encoding="utf-8", **kwargs): | |
|
||
Parameters | ||
---------- | ||
path : string File path, buffer-like, or None | ||
path : str (file path), buffer-like, or None | ||
if None, return generated bytes | ||
append : bool whether to append to an existing msgpack | ||
(default is False) | ||
|
@@ -4621,8 +4621,9 @@ def filter(self, items=None, like=None, regex=None, axis=None): | |
Keep labels from axis for which "like in label == True". | ||
regex : str (regular expression) | ||
Keep labels from axis for which re.search(regex, label) == True. | ||
axis : int or string axis name | ||
The axis to filter on. By default this is the info axis, | ||
axis : int or str | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a particular convention for axis you can use
From the docs: https://pandas.pydata.org/pandas-docs/stable/development/contributing_docstring.html#parameter-types There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in a99ef99 |
||
The axis to filter on, expressed either as an index (int) | ||
or axis name (str). By default this is the info axis, | ||
'index' for Series, 'columns' for DataFrame. | ||
|
||
Returns | ||
|
@@ -4855,7 +4856,7 @@ def sample( | |
random_state : int or numpy.random.RandomState, optional | ||
Seed for the random number generator (if int), or numpy RandomState | ||
object. | ||
axis : int or string, optional | ||
axis : int or str, optional | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same thing here for axis There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in a99ef99 |
||
Axis to sample. Accepts axis number or name. Default is stat axis | ||
for given data type (0 for Series and DataFrames). | ||
|
||
|
@@ -8462,7 +8463,7 @@ def first(self, offset): | |
|
||
Parameters | ||
---------- | ||
offset : string, DateOffset, dateutil.relativedelta | ||
offset : str, DateOffset, dateutil.relativedelta | ||
|
||
Returns | ||
------- | ||
|
@@ -8525,7 +8526,7 @@ def last(self, offset): | |
|
||
Parameters | ||
---------- | ||
offset : string, DateOffset, dateutil.relativedelta | ||
offset : str, DateOffset, dateutil.relativedelta | ||
|
||
Returns | ||
------- | ||
|
@@ -9133,7 +9134,7 @@ def _where( | |
|
||
Parameters | ||
---------- | ||
cond : boolean %(klass)s, array-like, or callable | ||
cond : bool %(klass)s, array-like, or callable | ||
Where `cond` is %(cond)s, keep the original value. Where | ||
%(cond_rev)s, replace with corresponding value from `other`. | ||
If `cond` is callable, it is computed on the %(klass)s and | ||
|
@@ -9440,9 +9441,10 @@ def tshift(self, periods=1, freq=None, axis=0): | |
---------- | ||
periods : int | ||
Number of periods to move, can be positive or negative | ||
freq : DateOffset, timedelta, or time rule string, default None | ||
Increment to use from the tseries module or time rule (e.g. 'EOM') | ||
axis : int or basestring | ||
freq : DateOffset, timedelta, or str, default None | ||
Increment to use from the tseries module | ||
or time rule expressed as a string (e.g. 'EOM') | ||
axis : int or str | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and finally here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in a99ef99 |
||
Corresponds to the axis that contains the Index | ||
|
||
Returns | ||
|
@@ -9500,9 +9502,9 @@ def truncate(self, before=None, after=None, axis=None, copy=True): | |
|
||
Parameters | ||
---------- | ||
before : date, string, int | ||
before : date, str, int | ||
Truncate all rows before this index value. | ||
after : date, string, int | ||
after : date, str, int | ||
Truncate all rows after this index value. | ||
axis : {0 or 'index', 1 or 'columns'}, optional | ||
Axis to truncate. Truncates the index (rows) by default. | ||
|
@@ -10311,7 +10313,7 @@ def _check_percentile(self, q): | |
How to handle NAs before computing percent changes. | ||
limit : int, default None | ||
The number of consecutive NAs to fill before stopping. | ||
freq : DateOffset, timedelta, or offset alias string, optional | ||
freq : DateOffset, timedelta, or str, optional | ||
Increment to use from time series API (e.g. 'M' or BDay()). | ||
**kwargs | ||
Additional keyword arguments are passed into | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since neither 'file path' nor 'filepath' are listed as types here, I've removed this and added a little clarification below.