Skip to content

Commit 93f5584

Browse files
author
Douglas Rudd
committed
Merge branch 'master' into empty-multiindex-regression-fix
2 parents f220f3c + 65a0e64 commit 93f5584

File tree

21 files changed

+127
-134
lines changed

21 files changed

+127
-134
lines changed

doc/source/io.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ usecols : array-like or callable, default ``None``
137137
138138
Using this parameter results in much faster parsing time and lower memory usage.
139139
as_recarray : boolean, default ``False``
140-
DEPRECATED: this argument will be removed in a future version. Please call
141-
``pd.read_csv(...).to_records()`` instead.
140+
141+
.. deprecated:: 0.18.2
142+
143+
Please call ``pd.read_csv(...).to_records()`` instead.
142144

143145
Return a NumPy recarray instead of a DataFrame after parsing the data. If
144146
set to ``True``, this option takes precedence over the ``squeeze`` parameter.
@@ -191,7 +193,11 @@ skiprows : list-like or integer, default ``None``
191193
skipfooter : int, default ``0``
192194
Number of lines at bottom of file to skip (unsupported with engine='c').
193195
skip_footer : int, default ``0``
194-
DEPRECATED: use the ``skipfooter`` parameter instead, as they are identical
196+
197+
.. deprecated:: 0.19.0
198+
199+
Use the ``skipfooter`` parameter instead, as they are identical
200+
195201
nrows : int, default ``None``
196202
Number of rows of file to read. Useful for reading pieces of large files.
197203
low_memory : boolean, default ``True``
@@ -202,16 +208,25 @@ low_memory : boolean, default ``True``
202208
use the ``chunksize`` or ``iterator`` parameter to return the data in chunks.
203209
(Only valid with C parser)
204210
buffer_lines : int, default None
205-
DEPRECATED: this argument will be removed in a future version because its
206-
value is not respected by the parser
211+
212+
.. deprecated:: 0.19.0
213+
214+
Argument removed because its value is not respected by the parser
215+
207216
compact_ints : boolean, default False
208-
DEPRECATED: this argument will be removed in a future version
217+
218+
.. deprecated:: 0.19.0
219+
220+
Argument moved to ``pd.to_numeric``
209221

210222
If ``compact_ints`` is ``True``, then for any column that is of integer dtype, the
211223
parser will attempt to cast it as the smallest integer ``dtype`` possible, either
212224
signed or unsigned depending on the specification from the ``use_unsigned`` parameter.
213225
use_unsigned : boolean, default False
214-
DEPRECATED: this argument will be removed in a future version
226+
227+
.. deprecated:: 0.18.2
228+
229+
Argument moved to ``pd.to_numeric``
215230

216231
If integer columns are being compacted (i.e. ``compact_ints=True``), specify whether
217232
the column should be compacted to the smallest signed or unsigned integer dtype.

doc/source/whatsnew/v0.21.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Removal of prior version deprecations/changes
7575
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7676

7777
- :func:`read_excel()` has dropped the ``has_index_names`` parameter (:issue:`10967`)
78+
- The ``pd.options.display.mpl_style`` configuration has been dropped (:issue:`12190`)
79+
- ``Index`` has dropped the ``.sym_diff()`` method in favor of ``.symmetric_difference()`` (:issue:`12591`)
7880
- ``Categorical`` has dropped the ``.order()`` and ``.sort()`` methods in favor of ``.sort_values()`` (:issue:`12882`)
7981

8082

doc/sphinxext/numpydoc/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ The following options can be set in conf.py:
4646
methods and attributes. If a table of contents is made, Sphinx expects
4747
each entry to have a separate page.
4848

49-
- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
49+
- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
5050

5151
Whether to insert an edit link after docstrings.

pandas/core/categorical.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ def itemsize(self):
398398

399399
def reshape(self, new_shape, *args, **kwargs):
400400
"""
401-
DEPRECATED: calling this method will raise an error in a
402-
future release.
401+
.. deprecated:: 0.19.0
402+
Calling this method will raise an error in a future release.
403403
404404
An ndarray-compatible method that returns `self` because
405405
`Categorical` instances cannot actually be reshaped.
@@ -430,7 +430,8 @@ def base(self):
430430
@classmethod
431431
def from_array(cls, data, **kwargs):
432432
"""
433-
DEPRECATED: Use ``Categorical`` instead.
433+
.. deprecated:: 0.19.0
434+
Use ``Categorical`` instead.
434435
435436
Make a Categorical type from a single array-like object.
436437

pandas/core/common.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ def in_qtconsole():
555555
"""
556556
check if we're inside an IPython qtconsole
557557
558-
DEPRECATED: This is no longer needed, or working, in IPython 3 and above.
558+
.. deprecated:: 0.14.1
559+
This is no longer needed, or working, in IPython 3 and above.
559560
"""
560561
try:
561562
ip = get_ipython() # noqa
@@ -573,8 +574,8 @@ def in_ipnb():
573574
"""
574575
check if we're inside an IPython Notebook
575576
576-
DEPRECATED: This is no longer used in pandas, and won't work in IPython 3
577-
and above.
577+
.. deprecated:: 0.14.1
578+
This is no longer needed, or working, in IPython 3 and above.
578579
"""
579580
try:
580581
ip = get_ipython() # noqa

pandas/core/config_init.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
module is imported, register them here rather then in the module.
1010
1111
"""
12-
import warnings
13-
1412
import pandas.core.config as cf
1513
from pandas.core.config import (is_int, is_bool, is_text, is_instance_factory,
1614
is_one_of_factory, get_default_val,
@@ -313,33 +311,6 @@ def use_numexpr_cb(key):
313311
style_backup = dict()
314312

315313

316-
def mpl_style_cb(key):
317-
warnings.warn(pc_mpl_style_deprecation_warning, FutureWarning,
318-
stacklevel=5)
319-
320-
import sys
321-
from pandas.plotting._style import mpl_stylesheet
322-
global style_backup
323-
324-
val = cf.get_option(key)
325-
326-
if 'matplotlib' not in sys.modules.keys():
327-
if not val: # starting up, we get reset to None
328-
return val
329-
raise Exception("matplotlib has not been imported. aborting")
330-
331-
import matplotlib.pyplot as plt
332-
333-
if val == 'default':
334-
style_backup = dict([(k, plt.rcParams[k]) for k in mpl_stylesheet])
335-
plt.rcParams.update(mpl_stylesheet)
336-
elif not val:
337-
if style_backup:
338-
plt.rcParams.update(style_backup)
339-
340-
return val
341-
342-
343314
def table_schema_cb(key):
344315
from pandas.io.formats.printing import _enable_data_resource_formatter
345316
_enable_data_resource_formatter(cf.get_option(key))
@@ -382,9 +353,6 @@ def table_schema_cb(key):
382353
validator=is_one_of_factory([True, False, 'truncate']))
383354
cf.register_option('chop_threshold', None, pc_chop_threshold_doc)
384355
cf.register_option('max_seq_items', 100, pc_max_seq_items)
385-
cf.register_option('mpl_style', None, pc_mpl_style_doc,
386-
validator=is_one_of_factory([None, False, 'default']),
387-
cb=mpl_style_cb)
388356
cf.register_option('height', 60, pc_height_doc,
389357
validator=is_instance_factory([type(None), int]))
390358
cf.register_option('width', 80, pc_width_doc,

pandas/core/generic.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,9 +1338,9 @@ def to_sql(self, name, con, flavor=None, schema=None, if_exists='fail',
13381338
Using SQLAlchemy makes it possible to use any DB supported by that
13391339
library. If a DBAPI2 object, only sqlite3 is supported.
13401340
flavor : 'sqlite', default None
1341-
DEPRECATED: this parameter will be removed in a future version,
1342-
as 'sqlite' is the only supported option if SQLAlchemy is not
1343-
installed.
1341+
.. deprecated:: 0.19.0
1342+
'sqlite' is the only supported option if SQLAlchemy is not
1343+
used.
13441344
schema : string, default None
13451345
Specify the schema (if database flavor supports this). If None, use
13461346
default schema.
@@ -3498,7 +3498,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
34983498
34993499
.. versionadded:: 0.20.0
35003500
3501-
raise_on_error : DEPRECATED use ``errors`` instead
3501+
raise_on_error : raise on invalid input
3502+
.. deprecated:: 0.20.0
3503+
Use ``errors`` instead
35023504
kwargs : keyword arguments to pass on to the constructor
35033505
35043506
Returns
@@ -3602,7 +3604,6 @@ def convert_objects(self, convert_dates=True, convert_numeric=False,
36023604
convert_timedeltas=True, copy=True):
36033605
"""
36043606
Deprecated.
3605-
36063607
Attempt to infer better dtype for object columns
36073608
36083609
Parameters
@@ -5809,8 +5810,9 @@ def tz_localize(self, tz, axis=0, level=None, copy=True,
58095810
- 'NaT' will return NaT where there are ambiguous times
58105811
- 'raise' will raise an AmbiguousTimeError if there are ambiguous
58115812
times
5812-
infer_dst : boolean, default False (DEPRECATED)
5813-
Attempt to infer fall dst-transition hours based on order
5813+
infer_dst : boolean, default False
5814+
.. deprecated:: 0.15.0
5815+
Attempt to infer fall dst-transition hours based on order
58145816
58155817
Returns
58165818
-------

pandas/core/indexes/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141

4242
from pandas.core.base import PandasObject, IndexOpsMixin
4343
import pandas.core.base as base
44-
from pandas.util._decorators import (Appender, Substitution, cache_readonly,
45-
deprecate, deprecate_kwarg)
44+
from pandas.util._decorators import (Appender, Substitution,
45+
cache_readonly, deprecate_kwarg)
4646
from pandas.core.indexes.frozen import FrozenList
4747
import pandas.core.common as com
4848
import pandas.core.dtypes.concat as _concat
@@ -2376,8 +2376,6 @@ def symmetric_difference(self, other, result_name=None):
23762376
attribs['freq'] = None
23772377
return self._shallow_copy_with_infer(the_diff, **attribs)
23782378

2379-
sym_diff = deprecate('sym_diff', symmetric_difference)
2380-
23812379
def _get_unique_index(self, dropna=False):
23822380
"""
23832381
Returns an index containing unique values.

pandas/core/indexes/datetimes.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ class DatetimeIndex(DatelikeOps, TimelikeOps, DatetimeIndexOpsMixin,
197197
times)
198198
- 'NaT' will return NaT where there are ambiguous times
199199
- 'raise' will raise an AmbiguousTimeError if there are ambiguous times
200-
infer_dst : boolean, default False (DEPRECATED)
201-
Attempt to infer fall dst-transition hours based on order
200+
infer_dst : boolean, default False
201+
.. deprecated:: 0.15.0
202+
Attempt to infer fall dst-transition hours based on order
202203
name : object
203204
Name to be stored in the index
204205
@@ -1818,8 +1819,9 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
18181819
18191820
.. versionadded:: 0.19.0
18201821
1821-
infer_dst : boolean, default False (DEPRECATED)
1822-
Attempt to infer fall dst-transition hours based on order
1822+
infer_dst : boolean, default False
1823+
.. deprecated:: 0.15.0
1824+
Attempt to infer fall dst-transition hours based on order
18231825
18241826
Returns
18251827
-------

pandas/core/indexes/period.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ def asfreq(self, freq=None, how='E'):
558558

559559
def to_datetime(self, dayfirst=False):
560560
"""
561-
DEPRECATED: use :meth:`to_timestamp` instead.
561+
.. deprecated:: 0.19.0
562+
Use :meth:`to_timestamp` instead.
562563
563564
Cast to DatetimeIndex.
564565
"""

0 commit comments

Comments
 (0)