You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.22.0.txt
+195
Original file line number
Diff line number
Diff line change
@@ -12,3 +12,198 @@ version.
12
12
13
13
Backwards incompatible API changes
14
14
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+
16
+
.. _whatsnew_0220.api_breaking.deps:
17
+
18
+
Dependencies have increased minimum versions
19
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
+
21
+
We have updated our minimum supported versions of dependencies (:issue:`15184`).
22
+
If installed, we now require:
23
+
24
+
+-----------------+-----------------+----------+
25
+
| Package | Minimum Version | Required |
26
+
+=================+=================+==========+
27
+
| python-dateutil | 2.5.0 | X |
28
+
+-----------------+-----------------+----------+
29
+
| openpyxl | 2.4.0 | |
30
+
+-----------------+-----------------+----------+
31
+
32
+
33
+
- Building pandas for development now requires ``cython >= 0.24`` (:issue:`18613`)
34
+
- Building from source now explicity requires ``setuptools`` in ``setup.py`` (:issue:`18113`)
35
+
36
+
.. _whatsnew_0220.api:
37
+
38
+
Other API Changes
39
+
^^^^^^^^^^^^^^^^^
40
+
41
+
- :func:`Series.astype` and :func:`Index.astype` with an incompatible dtype will now raise a ``TypeError`` rather than a ``ValueError`` (:issue:`18231`)
42
+
- ``Series`` construction with an ``object`` dtyped tz-aware datetime and ``dtype=object`` specified, will now return an ``object`` dtyped ``Series``, previously this would infer the datetime dtype (:issue:`18231`)
43
+
- A :class:`Series` of ``dtype=category`` constructed from an empty ``dict`` will now have categories of ``dtype=object`` rather than ``dtype=float64``, consistently with the case in which an empty list is passed (:issue:`18515`)
44
+
- ``NaT`` division with :class:`datetime.timedelta` will now return ``NaN`` instead of raising (:issue:`17876`)
45
+
- All-NaN levels in a ``MultiIndex`` are now assigned ``float`` rather than ``object`` dtype, promoting consistency with ``Index`` (:issue:`17929`).
46
+
- :class:`Timestamp` will no longer silently ignore unused or invalid ``tz`` or ``tzinfo`` keyword arguments (:issue:`17690`)
47
+
- :class:`Timestamp` will no longer silently ignore invalid ``freq`` arguments (:issue:`5168`)
48
+
- :class:`CacheableOffset` and :class:`WeekDay` are no longer available in the ``pandas.tseries.offsets`` module (:issue:`17830`)
49
+
- ``pandas.tseries.frequencies.get_freq_group()`` and ``pandas.tseries.frequencies.DAYS`` are removed from the public API (:issue:`18034`)
50
+
- :func:`Series.truncate` and :func:`DataFrame.truncate` will raise a ``ValueError`` if the index is not sorted instead of an unhelpful ``KeyError`` (:issue:`17935`)
51
+
- :func:`Index.map` can now accept ``Series`` and dictionary input objects (:issue:`12756`, :issue:`18482`, :issue:`18509`).
52
+
- :func:`Dataframe.unstack` will now default to filling with ``np.nan`` for ``object`` columns. (:issue:`12815`)
53
+
- :class:`IntervalIndex` constructor will raise if the ``closed`` parameter conflicts with how the input data is inferred to be closed (:issue:`18421`)
54
+
- Inserting missing values into indexes will work for all types of indexes and automatically insert the correct type of missing value (``NaN``, ``NaT``, etc.) regardless of the type passed in (:issue:`18295`)
55
+
- Restricted ``DateOffset`` keyword arguments. Previously, ``DateOffset`` subclasses allowed arbitrary keyword arguments which could lead to unexpected behavior. Now, only valid arguments will be accepted. (:issue:`17176`, :issue:`18226`).
56
+
- :func:`DataFrame.from_items` provides a more informative error message when passed scalar values (:issue:`17312`)
57
+
- When created with duplicate labels, ``MultiIndex`` now raises a ``ValueError``. (:issue:`17464`)
58
+
- :func:`Series.fillna` now raises a ``TypeError`` instead of a ``ValueError`` when passed a list, tuple or DataFrame as a ``value`` (:issue:`18293`)
59
+
- :func:`pandas.DataFrame.merge` no longer casts a ``float`` column to ``object`` when merging on ``int`` and ``float`` columns (:issue:`16572`)
60
+
- The default NA value for :class:`UInt64Index` has changed from 0 to ``NaN``, which impacts methods that mask with NA, such as ``UInt64Index.where()`` (:issue:`18398`)
61
+
- Refactored ``setup.py`` to use ``find_packages`` instead of explicitly listing out all subpackages (:issue:`18535`)
62
+
- Rearranged the order of keyword arguments in :func:`read_excel()` to align with :func:`read_csv()` (:issue:`16672`)
63
+
- :func:`pandas.merge` now raises a ``ValueError`` when trying to merge on incompatible data types (:issue:`9780`)
64
+
- :func:`wide_to_long` previously kept numeric-like suffixes as ``object`` dtype. Now they are cast to numeric if possible (:issue:`17627`)
65
+
- comment arg is exposed as a named parameter in :func:`read_excel`
66
+
67
+
.. _whatsnew_0220.deprecations:
68
+
69
+
Deprecations
70
+
~~~~~~~~~~~~
71
+
72
+
- ``Series.from_array`` and ``SparseSeries.from_array`` are deprecated. Use the normal constructor ``Series(..)`` and ``SparseSeries(..)`` instead (:issue:`18213`).
73
+
- ``DataFrame.as_matrix`` is deprecated. Use ``DataFrame.values`` instead (:issue:`18458`).
74
+
- ``Series.asobject``, ``DatetimeIndex.asobject``, ``PeriodIndex.asobject`` and ``TimeDeltaIndex.asobject`` have been deprecated. Use ``.astype(object)`` instead (:issue:`18572`)
75
+
76
+
.. _whatsnew_0220.prior_deprecations:
77
+
78
+
Removal of prior version deprecations/changes
79
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
+
81
+
- Warnings against the obsolete usage ``Categorical(codes, categories)``, which were emitted for instance when the first two arguments to ``Categorical()`` had different dtypes, and recommended the use of ``Categorical.from_codes``, have now been removed (:issue:`8074`)
82
+
- The ``levels`` and ``labels`` attributes of a ``MultiIndex`` can no longer be set directly (:issue:`4039`).
83
+
- ``pd.tseries.util.pivot_annual`` has been removed (deprecated since v0.19). Use ``pivot_table`` instead (:issue:`18370`)
84
+
- ``pd.tseries.util.isleapyear`` has been removed (deprecated since v0.19). Use ``.is_leap_year`` property in Datetime-likes instead (:issue:`18370`)
85
+
- ``pd.ordered_merge`` has been removed (deprecated since v0.19). Use ``pd.merge_ordered`` instead (:issue:`18459`)
86
+
- The ``SparseList`` class has been removed (:issue:`14007`)
87
+
- The ``pandas.io.wb`` and ``pandas.io.data`` stub modules have been removed (:issue:`13735`)
88
+
- ``Categorical.from_array`` has been removed (:issue:`13854`)
89
+
- The ``freq`` and ``how`` parameters have been removed from the ``rolling``/``expanding``/``ewm`` methods of DataFrame
90
+
and Series (deprecated since v0.18). Instead, resample before calling the methods. (:issue:18601 & :issue:18668)
91
+
- ``DatetimeIndex.to_datetime``, ``Timestamp.to_datetime``, ``PeriodIndex.to_datetime``, and ``Index.to_datetime`` have been removed (:issue:`8254`, :issue:`14096`, :issue:`14113`)
92
+
- :func:`read_csv` has dropped the ``skip_footer`` parameter (:issue:`13386`)
93
+
94
+
.. _whatsnew_0220.performance:
95
+
96
+
Performance Improvements
97
+
~~~~~~~~~~~~~~~~~~~~~~~~
98
+
99
+
- Indexers on ``Series`` or ``DataFrame`` no longer create a reference cycle (:issue:`17956`)
100
+
- Added a keyword argument, ``cache``, to :func:`to_datetime` that improved the performance of converting duplicate datetime arguments (:issue:`11665`)
101
+
- :class`DateOffset` arithmetic performance is improved (:issue:`18218`)
102
+
- Converting a ``Series`` of ``Timedelta`` objects to days, seconds, etc... sped up through vectorization of underlying methods (:issue:`18092`)
103
+
- Improved performance of ``.map()`` with a ``Series/dict`` input (:issue:`15081`)
104
+
- The overriden ``Timedelta`` properties of days, seconds and microseconds have been removed, leveraging their built-in Python versions instead (:issue:`18242`)
105
+
- ``Series`` construction will reduce the number of copies made of the input data in certain cases (:issue:`17449`)
106
+
- Improved performance of :func:`Series.dt.date` and :func:`DatetimeIndex.date` (:issue:`18058`)
107
+
- Improved performance of :func:`Series.dt.time` and :func:`DatetimeIndex.time` (:issue:`18461`)
108
+
- Improved performance of :func:`IntervalIndex.symmetric_difference()` (:issue:`18475`)
109
+
- Improved performance of ``DatetimeIndex`` and ``Series`` arithmetic operations with Business-Month and Business-Quarter frequencies (:issue:`18489`)
110
+
- :func:`Series` / :func:`DataFrame` tab completion limits to 100 values, for better performance. (:issue:`18587`)
111
+
112
+
.. _whatsnew_0220.docs:
113
+
114
+
Documentation Changes
115
+
~~~~~~~~~~~~~~~~~~~~~
116
+
117
+
-
118
+
-
119
+
-
120
+
121
+
.. _whatsnew_0220.bug_fixes:
122
+
123
+
Bug Fixes
124
+
~~~~~~~~~
125
+
126
+
127
+
Conversion
128
+
^^^^^^^^^^
129
+
130
+
- Bug in :class:`Index` constructor with ``dtype='uint64'`` where int-like floats were not coerced to :class:`UInt64Index` (:issue:`18400`)
131
+
- Bug in the :class:`DataFrame` constructor in which data containing very large positive or very large negative numbers was causing ``OverflowError`` (:issue:`18584`)
132
+
- Fixed a bug where creating a Series from an array that contains both tz-naive and tz-aware values will result in a Series whose dtype is tz-aware instead of object (:issue:`16406`)
133
+
- Adding a ``Period`` object to a ``datetime`` or ``Timestamp`` object will now correctly raise a ``TypeError`` (:issue:`17983`)
134
+
- Fixed a bug where ``FY5253`` date offsets could incorrectly raise an ``AssertionError`` in arithmetic operatons (:issue:`14774`)
135
+
- Bug in :meth:`Index.astype` with a categorical dtype where the resultant index is not converted to a :class:`CategoricalIndex` for all types of index (:issue:`18630`)
136
+
137
+
138
+
Indexing
139
+
^^^^^^^^
140
+
141
+
- Bug in :func:`Series.truncate` which raises ``TypeError`` with a monotonic ``PeriodIndex`` (:issue:`17717`)
142
+
- Bug in :func:`DataFrame.groupby` where tuples were interpreted as lists of keys rather than as keys (:issue:`17979`, :issue:`18249`)
143
+
- Bug in :func:`MultiIndex.get_level_values` which would return an invalid index on level of ints with missing values (:issue:`17924`)
144
+
- Bug in :func:`MultiIndex.remove_unused_levels` which would fill nan values (:issue:`18417`)
145
+
- Bug in :func:`MultiIndex.from_tuples`` which would fail to take zipped tuples in python3 (:issue:`18434`)
146
+
- Bug in :class:`Index` construction from list of mixed type tuples (:issue:`18505`)
147
+
- Bug in :class:`IntervalIndex` where empty and purely NA data was constructed inconsistently depending on the construction method (:issue:`18421`)
148
+
- Bug in :func:`IntervalIndex.symmetric_difference` where the symmetric difference with a non-``IntervalIndex`` did not raise (:issue:`18475`)
149
+
- Bug in indexing a datetimelike ``Index`` that raised ``ValueError`` instead of ``IndexError`` (:issue:`18386`).
150
+
- Bug in tz-aware :class:`DatetimeIndex` where addition/subtraction with a :class:`TimedeltaIndex` or array with ``dtype='timedelta64[ns]'`` was incorrect (:issue:`17558`)
151
+
152
+
I/O
153
+
^^^
154
+
155
+
- :func:`read_html` now rewinds seekable IO objects after parse failure, before attempting to parse with a new parser. If a parser errors and the object is non-seekable, an informative error is raised suggesting the use of a different parser (:issue:`17975`)
156
+
- Bug in :func:`read_msgpack` with a non existent file is passed in Python 2 (:issue:`15296`)
157
+
- Bug in :func:`read_csv` where a ``MultiIndex`` with duplicate columns was not being mangled appropriately (:issue:`18062`)
158
+
- Bug in :func:`read_sas` where a file with 0 variables gave an ``AttributeError`` incorrectly. Now it gives an ``EmptyDataError`` (:issue:`18184`)
159
+
-
160
+
-
161
+
162
+
Plotting
163
+
^^^^^^^^
164
+
165
+
- :func: `DataFrame.plot` now raises a ``ValueError`` when the ``x`` or ``y`` argument is improperly formed (:issue:`18671`)
166
+
-
167
+
-
168
+
169
+
Groupby/Resample/Rolling
170
+
^^^^^^^^^^^^^^^^^^^^^^^^
171
+
172
+
- Bug when grouping by a single column and aggregating with a class like ``list`` or ``tuple`` (:issue:`18079`)
173
+
-
174
+
-
175
+
176
+
Sparse
177
+
^^^^^^
178
+
179
+
-
180
+
-
181
+
-
182
+
183
+
Reshaping
184
+
^^^^^^^^^
185
+
186
+
- Bug in :func:`DataFrame.stack` which fails trying to sort mixed type levels under Python 3 (:issue:`18310`)
187
+
- Fixed construction of a :class:`Series` from a ``dict`` containing ``NaN`` as key (:issue:`18480`)
188
+
189
+
-
190
+
191
+
Numeric
192
+
^^^^^^^
193
+
194
+
-
195
+
-
196
+
-
197
+
198
+
Categorical
199
+
^^^^^^^^^^^
200
+
201
+
-
202
+
-
203
+
-
204
+
205
+
Other
206
+
^^^^^
207
+
208
+
- Improved error message when attempting to use a Python keyword as an identifier in a ``numexpr`` backed query (:issue:`18221`)
0 commit comments