-
-
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: Update Sphinx Deprecated Directive #16512
Changes from 2 commits
4c73c42
400bb40
135f8d0
7fccb78
9f945c2
5d8db3f
c281c04
4dcab50
8f31b83
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 |
---|---|---|
|
@@ -137,8 +137,9 @@ usecols : array-like or callable, default ``None`` | |
|
||
Using this parameter results in much faster parsing time and lower memory usage. | ||
as_recarray : boolean, default ``False`` | ||
DEPRECATED: this argument will be removed in a future version. Please call | ||
``pd.read_csv(...).to_records()`` instead. | ||
.. deprecated:: 0.18.2 | ||
This argument will be removed in a future version. Please call | ||
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 would eliminate things like: as the deprecated tag already has this (I think) |
||
``pd.read_csv(...).to_records()`` instead. | ||
|
||
Return a NumPy recarray instead of a DataFrame after parsing the data. If | ||
set to ``True``, this option takes precedence over the ``squeeze`` parameter. | ||
|
@@ -191,7 +192,8 @@ skiprows : list-like or integer, default ``None`` | |
skipfooter : int, default ``0`` | ||
Number of lines at bottom of file to skip (unsupported with engine='c'). | ||
skip_footer : int, default ``0`` | ||
DEPRECATED: use the ``skipfooter`` parameter instead, as they are identical | ||
.. deprecated:: 0.19.0 | ||
Use the ``skipfooter`` parameter instead, as they are identical | ||
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. e.g. this like this |
||
nrows : int, default ``None`` | ||
Number of rows of file to read. Useful for reading pieces of large files. | ||
low_memory : boolean, default ``True`` | ||
|
@@ -202,16 +204,19 @@ low_memory : boolean, default ``True`` | |
use the ``chunksize`` or ``iterator`` parameter to return the data in chunks. | ||
(Only valid with C parser) | ||
buffer_lines : int, default None | ||
DEPRECATED: this argument will be removed in a future version because its | ||
value is not respected by the parser | ||
.. deprecated:: 0.18.2 | ||
This argument will be removed in a future version because its | ||
value is not respected by the parser | ||
compact_ints : boolean, default False | ||
.. deprecated:: 0.18.2 | ||
DEPRECATED: this argument will be removed in a future version | ||
|
||
If ``compact_ints`` is ``True``, then for any column that is of integer dtype, the | ||
parser will attempt to cast it as the smallest integer ``dtype`` possible, either | ||
signed or unsigned depending on the specification from the ``use_unsigned`` parameter. | ||
use_unsigned : boolean, default False | ||
DEPRECATED: this argument will be removed in a future version | ||
.. deprecated:: 0.18.2 | ||
This argument will be removed in a future version | ||
|
||
If integer columns are being compacted (i.e. ``compact_ints=True``), specify whether | ||
the column should be compacted to the smallest signed or unsigned integer dtype. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ The following options can be set in conf.py: | |
methods and attributes. If a table of contents is made, Sphinx expects | ||
each entry to have a separate page. | ||
|
||
- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead) | ||
- numpydoc_edit_link: bool | ||
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. please leave this one as is (numpydoc's source is just included in pandas, we should adapt it only minimally) |
||
.. deprecated:: | ||
Edit your HTML template instead | ||
|
||
Whether to insert an edit link after docstrings. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1148,7 +1148,8 @@ cdef class _Timestamp(datetime): | |
|
||
cpdef datetime to_datetime(_Timestamp self): | ||
""" | ||
DEPRECATED: use :meth:`to_pydatetime` instead. | ||
.. deprecated:: 0.19.0 | ||
Use :meth:`to_pydatetime` instead. | ||
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 leave this one as is? The thing is that the first sentence of the docstring gets added to the API overview. So the actual "DEPRECATED .. " is then more useful as the directive code (although I am actually not sure what sphinx would put in the api summary table) 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. |
||
|
||
Convert a Timestamp object to a native Python datetime object. | ||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3477,7 +3477,8 @@ 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` | ||
.. deprecated:: 0.20.0 | ||
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 comment as above for this one, and some others below as well |
||
|
||
Sort multilevel index by chosen axis and primary level. Data will be | ||
lexicographically sorted by the chosen level followed by the other | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1322,9 +1322,10 @@ def to_sql(self, name, con, flavor=None, schema=None, if_exists='fail', | |
Using SQLAlchemy makes it possible to use any DB supported by that | ||
library. If a DBAPI2 object, only sqlite3 is supported. | ||
flavor : 'sqlite', default None | ||
DEPRECATED: this parameter will be removed in a future version, | ||
as 'sqlite' is the only supported option if SQLAlchemy is not | ||
installed. | ||
.. deprecated:: 0.19.0 | ||
This parameter will be removed in a future version, | ||
as 'sqlite' is the only supported option if SQLAlchemy is not | ||
installed. | ||
schema : string, default None | ||
Specify the schema (if database flavor supports this). If None, use | ||
default schema. | ||
|
@@ -3162,7 +3163,8 @@ def _consolidate(self, inplace=False): | |
|
||
def consolidate(self, inplace=False): | ||
""" | ||
DEPRECATED: consolidate will be an internal implementation only. | ||
.. deprecated:: 0.20.0 | ||
Consolidate will be an internal implementation only. | ||
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 comment here as previous. By putting this deprecated directive on the first line, it gets less informative in a api summary table |
||
""" | ||
# 15483 | ||
warnings.warn("consolidate is deprecated and will be removed in a " | ||
|
@@ -3373,7 +3375,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs): | |
|
||
.. versionadded:: 0.20.0 | ||
|
||
raise_on_error : DEPRECATED use ``errors`` instead | ||
raise_on_error : raise on invalid input | ||
.. deprecated:: 0.20.0 | ||
Use ``errors`` instead | ||
kwargs : keyword arguments to pass on to the constructor | ||
|
||
Returns | ||
|
@@ -3476,7 +3480,7 @@ def _convert(self, datetime=False, numeric=False, timedelta=False, | |
def convert_objects(self, convert_dates=True, convert_numeric=False, | ||
convert_timedeltas=True, copy=True): | ||
""" | ||
Deprecated. | ||
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. This one should not be removed I think |
||
.. deprecated:: 0.18.0 | ||
|
||
Attempt to infer better dtype for object columns | ||
|
||
|
@@ -5684,8 +5688,9 @@ def tz_localize(self, tz, axis=0, level=None, copy=True, | |
- 'NaT' will return NaT where there are ambiguous times | ||
- 'raise' will raise an AmbiguousTimeError if there are ambiguous | ||
times | ||
infer_dst : boolean, default False (DEPRECATED) | ||
Attempt to infer fall dst-transition hours based on order | ||
infer_dst : boolean, default False | ||
.. deprecated:: 0.15.0 | ||
Attempt to infer fall dst-transition hours based on order | ||
|
||
Returns | ||
------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -850,8 +850,9 @@ def repeat(self, repeats, *args, **kwargs): | |
|
||
def reshape(self, *args, **kwargs): | ||
""" | ||
DEPRECATED: calling this method will raise an error in a | ||
future release. Please call ``.values.reshape(...)`` instead. | ||
.. deprecated:: 0.19.0 | ||
Calling this method will raise an error in a future release. | ||
Please call ``.values.reshape(...)`` instead. | ||
|
||
return an ndarray with the values shape | ||
if the specified shape matches exactly the current shape, then | ||
|
@@ -1940,7 +1941,8 @@ def nsmallest(self, n=5, keep='first'): | |
|
||
def sortlevel(self, level=0, ascending=True, sort_remaining=True): | ||
""" | ||
DEPRECATED: use :meth:`Series.sort_index` | ||
.. deprecated:: 0.20.0 | ||
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. This one I would leave as well |
||
Use :meth:`Series.sort_index` | ||
|
||
Sort Series with MultiIndex by chosen level. Data will be | ||
lexicographically sorted by the chosen level followed by the other | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -478,7 +478,10 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan, as_indexer=None): | |
flags : int, default 0 (no flags) | ||
re module flags, e.g. re.IGNORECASE | ||
na : default NaN, fill value for missing values. | ||
as_indexer : DEPRECATED | ||
as_indexer : False, by default, gives deprecated behavior better | ||
achieved using str_extract. True return boolean indexer. | ||
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. This is not fully correct. It is just ignored, so the explanation for True or False doesn't matter. |
||
.. deprecated:: 0.20.0 | ||
Keyword is ignored | ||
|
||
Returns | ||
------- | ||
|
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.
When using the deprecated directive, you will need to add blank lines around it