-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: Using deprecated sphinx directive instead of non-standard messages in docstrings (#18928) #18934
DOC: Using deprecated sphinx directive instead of non-standard messages in docstrings (#18928) #18934
Changes from all commits
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 |
---|---|---|
|
@@ -1326,9 +1326,10 @@ def _from_arrays(cls, arrays, columns, index, dtype=None): | |
def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, | ||
encoding=None, tupleize_cols=None, | ||
infer_datetime_format=False): | ||
""" | ||
Read CSV file (DEPRECATED, please use :func:`pandas.read_csv` | ||
instead). | ||
"""Read CSV file. | ||
|
||
.. deprecated:: 0.21.0 | ||
Use :func:`pandas.read_csv` instead. | ||
|
||
It is preferable to use the more powerful :func:`pandas.read_csv` | ||
for most general purposes, but ``from_csv`` makes for an easy | ||
|
@@ -1979,12 +1980,10 @@ def _unpickle_matrix_compat(self, state): # pragma: no cover | |
# Getting and setting elements | ||
|
||
def get_value(self, index, col, takeable=False): | ||
""" | ||
Quickly retrieve single value at passed column and index | ||
"""Quickly retrieve single value at passed column and index | ||
|
||
.. deprecated:: 0.21.0 | ||
|
||
Please use .at[] or .iat[] accessors. | ||
Use .at[] or .iat[] accessors instead. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -2024,12 +2023,10 @@ def _get_value(self, index, col, takeable=False): | |
_get_value.__doc__ = get_value.__doc__ | ||
|
||
def set_value(self, index, col, value, takeable=False): | ||
""" | ||
Put single value at passed column and index | ||
"""Put single value at passed column and index | ||
|
||
.. deprecated:: 0.21.0 | ||
|
||
Please use .at[] or .iat[] accessors. | ||
Use .at[] or .iat[] accessors instead. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -3737,12 +3734,13 @@ def sort_index(self, axis=0, level=None, ascending=True, inplace=False, | |
|
||
def sortlevel(self, level=0, axis=0, ascending=True, inplace=False, | ||
sort_remaining=True): | ||
""" | ||
DEPRECATED: use :meth:`DataFrame.sort_index` | ||
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 here |
||
|
||
Sort multilevel index by chosen axis and primary level. Data will be | ||
"""Sort multilevel index by chosen axis and primary level. Data will be | ||
lexicographically sorted by the chosen level followed by the other | ||
levels (in order) | ||
levels (in order). | ||
|
||
.. deprecated:: 0.20.0 | ||
Use :meth:`DataFrame.sort_index` | ||
|
||
|
||
Parameters | ||
---------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2718,10 +2718,10 @@ def xs(self, key, axis=0, level=None, drop_level=True): | |
_xs = xs | ||
|
||
def select(self, crit, axis=0): | ||
""" | ||
Return data corresponding to axis labels matching criteria | ||
"""Return data corresponding to axis labels matching criteria | ||
|
||
DEPRECATED: use df.loc[df.index.map(crit)] to select via labels | ||
.. deprecated:: 0.21.0 | ||
Use df.loc[df.index.map(crit)] to select via labels | ||
|
||
Parameters | ||
---------- | ||
|
@@ -4108,8 +4108,11 @@ def _consolidate(self, inplace=False): | |
return self._constructor(cons_data).__finalize__(self) | ||
|
||
def consolidate(self, inplace=False): | ||
""" | ||
DEPRECATED: consolidate will be an internal implementation only. | ||
"""Compute NDFrame with "consolidated" internals (data of each dtype | ||
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. For future reference, please never use 'NDFrame' is user-facing docstrings. Users should not be aware what that means. |
||
grouped together in a single ndarray). | ||
|
||
.. deprecated:: 0.20.0 | ||
Consolidate will be an internal implementation only. | ||
""" | ||
# 15483 | ||
warnings.warn("consolidate is deprecated and will be removed in a " | ||
|
@@ -4160,11 +4163,10 @@ def _get_bool_data(self): | |
# Internal Interface Methods | ||
|
||
def as_matrix(self, columns=None): | ||
""" | ||
DEPRECATED: as_matrix will be removed in a future version. | ||
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 here |
||
Use :meth:`DataFrame.values` instead. | ||
"""Convert the frame to its Numpy-array representation. | ||
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 here |
||
|
||
Convert the frame to its Numpy-array representation. | ||
.. deprecated:: 0.23.0 | ||
Use :meth:`DataFrame.values` instead. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -4479,12 +4481,11 @@ def _convert(self, datetime=False, numeric=False, timedelta=False, | |
timedelta=timedelta, coerce=coerce, | ||
copy=copy)).__finalize__(self) | ||
|
||
# TODO: Remove in 0.18 or 2017, which ever is sooner | ||
def convert_objects(self, convert_dates=True, convert_numeric=False, | ||
convert_timedeltas=True, copy=True): | ||
""" | ||
Deprecated. | ||
Attempt to infer better dtype for object columns | ||
"""Attempt to infer better dtype for object columns. | ||
|
||
.. deprecated:: 0.21.0 | ||
|
||
Parameters | ||
---------- | ||
|
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.
For this case I actually don't find this an improvement. For deprecated methods, I find it useful that this is clear from the one-liner summary this it is deprecated, so you directly see this in the online api summary tables (on api.rst or on the DataFrame docstring page).
We could also do both?
(I know we don't do this consistently for all deprecated methods as well, but from_csv seems like a more important one)