-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: fix formatting in the ExtensionArray docstrings #28686
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 4 commits
a0b1ae3
a0e5097
8901b20
32f9a21
c5e31fc
149ba48
236dadb
de80ceb
357c50f
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ class ExtensionArray: | |
""" | ||
Abstract base class for custom 1-D array types. | ||
|
||
pandas will recognize instances of this class as proper arrays | ||
pandas will recognize instances of this claspandas.api.extensions.ExtensionArray.views as proper arrays | ||
with a custom type and will not attempt to coerce them to objects. They | ||
may be stored directly inside a :class:`DataFrame` or :class:`Series`. | ||
|
||
|
@@ -474,7 +474,7 @@ def fillna(self, value=None, method=None, limit=None): | |
method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None | ||
Method to use for filling holes in reindexed Series | ||
pad / ffill: propagate last valid observation forward to next valid | ||
backfill / bfill: use NEXT valid observation to fill gap | ||
backfill / bfill: use NEXT valid observation to fill gap. | ||
limit : int, default None | ||
If method is specified, this is the maximum number of consecutive | ||
NaN values to forward/backward fill. In other words, if there is | ||
|
@@ -485,7 +485,8 @@ def fillna(self, value=None, method=None, limit=None): | |
|
||
Returns | ||
------- | ||
filled : ExtensionArray with NA/NaN filled | ||
ExtensionArray | ||
With NA/NaN filled. | ||
""" | ||
value, method = validate_fillna_kwargs(value, method) | ||
|
||
|
@@ -539,13 +540,14 @@ def shift(self, periods: int = 1, fill_value: object = None) -> ABCExtensionArra | |
|
||
fill_value : object, optional | ||
The scalar value to use for newly introduced missing values. | ||
The default is ``self.dtype.na_value`` | ||
The default is ``self.dtype.na_value``. | ||
|
||
.. versionadded:: 0.24.0 | ||
|
||
Returns | ||
------- | ||
shifted : ExtensionArray | ||
ExtensionArray | ||
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. I think this needs to be unindented to render properly 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. agreed, thanks 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. @HughKelley can you fix this please, so we can merge. Thanks! 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. @datapythonista should I make the change with an additional commit or is there another way to do this? 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. Additional commit. 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. Can you fix the indantation here @HughKelley please? |
||
Shifted. | ||
datapythonista marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Notes | ||
----- | ||
|
@@ -869,11 +871,12 @@ def view(self, dtype=None) -> Union[ABCExtensionArray, np.ndarray]: | |
Parameters | ||
---------- | ||
dtype : str, np.dtype, or ExtensionDtype, optional | ||
Default None | ||
Default None. | ||
|
||
Returns | ||
------- | ||
ExtensionArray | ||
The array calling .view. | ||
HughKelley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
# NB: | ||
# - This must return a *new* object referencing the same data, not self. | ||
|
Uh oh!
There was an error while loading. Please reload this page.