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.21.0.txt
+52-1
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,7 @@ Other Enhancements
112
112
- `read_*` methods can now infer compression from non-string paths, such as ``pathlib.Path`` objects (:issue:`17206`).
113
113
- :func:`pd.read_sas()` now recognizes much more of the most frequently used date (datetime) formats in SAS7BDAT files (:issue:`15871`).
114
114
- :func:`DataFrame.items` and :func:`Series.items` is now present in both Python 2 and 3 and is lazy in all cases (:issue:`13918`, :issue:`17213`)
115
+
- :func:`Styler.where` has been implemented. It is as a convenience for :func:`Styler.applymap` and enables simple DataFrame styling on the Jupyter notebook (:issue:`17474`).
115
116
116
117
117
118
@@ -187,6 +188,53 @@ the target. Now, a ``ValueError`` will be raised when such an input is passed in
187
188
...
188
189
ValueError: Cannot operate inplace if there is no assignment
189
190
191
+
.. _whatsnew_0210.api_breaking.iteration_scalars:
192
+
193
+
Iteration of Series/Index will now return Python scalars
Previously, when using certain iteration methods for a ``Series`` with dtype ``int`` or ``float``, you would receive a ``numpy`` scalar, e.g. a ``np.int64``, rather than a Python ``int``. Issue (:issue:`10904`) corrected this for ``Series.tolist()`` and ``list(Series)``. This change makes all iteration methods consistent, in particular, for ``__iter__()`` and ``.map()``; note that this only affects int/float dtypes. (:issue:`13236`, :issue:`13258`, :issue:`14216`).
197
+
198
+
.. ipython:: python
199
+
200
+
s = pd.Series([1, 2, 3])
201
+
s
202
+
203
+
Previously:
204
+
205
+
.. code-block:: ipython
206
+
207
+
In [2]: type(list(s)[0])
208
+
Out[2]: numpy.int64
209
+
210
+
New Behaviour:
211
+
212
+
.. ipython:: python
213
+
214
+
type(list(s)[0])
215
+
216
+
Furthermore this will now correctly box the results of iteration for :func:`DataFrame.to_dict` as well.
217
+
218
+
.. ipython:: ipython
219
+
220
+
d = {'a':[1], 'b':['b']}
221
+
df = pd,DataFrame(d)
222
+
223
+
Previously:
224
+
225
+
.. code-block:: ipython
226
+
227
+
In [8]: type(df.to_dict()['a'][0])
228
+
Out[8]: numpy.int64
229
+
230
+
New Behaviour:
231
+
232
+
.. ipython:: python
233
+
234
+
type(df.to_dict()['a'][0])
235
+
236
+
.. _whatsnew_0210.api_breaking.dtype_conversions:
237
+
190
238
Dtype Conversions
191
239
^^^^^^^^^^^^^^^^^
192
240
@@ -340,6 +388,8 @@ Deprecations
340
388
341
389
- ``pd.options.html.border`` has been deprecated in favor of ``pd.options.display.html.border`` (:issue:`15793`).
342
390
391
+
- :func:`SeriesGroupBy.nth` has deprecated ``True`` in favor of ``'all'`` for its kwarg ``dropna`` (:issue:`11038`).
392
+
343
393
.. _whatsnew_0210.prior_deprecations:
344
394
345
395
Removal of prior version deprecations/changes
@@ -411,6 +461,7 @@ I/O
411
461
- Bug in :func:`read_csv` when called with a single-element list ``header`` would return a ``DataFrame`` of all NaN values (:issue:`7757`)
412
462
- Bug in :func:`read_stata` where value labels could not be read when using an iterator (:issue:`16923`)
413
463
- Bug in :func:`read_html` where import check fails when run in multiple threads (:issue:`16928`)
464
+
- Bug in :func:`read_csv` where automatic delimiter detection caused a ``TypeError`` to be thrown when a bad line was encountered rather than the correct error message (:issue:`13374`)
414
465
415
466
Plotting
416
467
^^^^^^^^
@@ -475,4 +526,4 @@ Other
475
526
^^^^^
476
527
- Bug in :func:`eval` where the ``inplace`` parameter was being incorrectly handled (:issue:`16732`)
477
528
- Several ``NaT`` method docstrings (e.g. :func:`NaT.ctime`) were incorrect (:issue:`17327`)
478
-
- The documentation has had references to versions < v0.16 removed and cleaned up (:issue:`17442`, :issue:`17442`& :issue:`#17404`)
529
+
- The documentation has had references to versions < v0.17 removed and cleaned up (:issue:`17442`, :issue:`17442`, :issue:`17404` & :issue:`17504`)
0 commit comments