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/v2.1.0.rst
+16-2
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,11 @@ Enhancements
19
19
Copy-on-Write improvements
20
20
^^^^^^^^^^^^^^^^^^^^^^^^^^
21
21
22
+
- Calling :meth:`Index.values` will now return a read-only NumPy array (:issue:`53704`)
22
23
- Setting a :class:`Series` into a :class:`DataFrame` now creates a lazy instead of a deep copy (:issue:`53142`)
24
+
- The :class:`DataFrame` constructor, when constructing a DataFrame from a dictionary
25
+
of Index objects and specifying ``copy=False``, will now use a lazy copy
26
+
of those Index objects for the columns of the DataFrame (:issue:`52947`)
23
27
24
28
.. _whatsnew_210.enhancements.enhancement2:
25
29
@@ -109,6 +113,7 @@ Other enhancements
109
113
- Added ``engine_kwargs`` parameter to :meth:`DataFrame.to_excel` (:issue:`53220`)
110
114
- Added a new parameter ``by_row`` to :meth:`Series.apply`. When set to ``False`` the supplied callables will always operate on the whole Series (:issue:`53400`).
111
115
- Groupby aggregations (such as :meth:`DataFrameGroupby.sum`) now can preserve the dtype of the input instead of casting to ``float64`` (:issue:`44952`)
116
+
- Improved error message when :meth:`DataFrameGroupBy.agg` failed (:issue:`52930`)
112
117
- Many read/to_* functions, such as :meth:`DataFrame.to_pickle` and :func:`read_csv`, support forwarding compression arguments to lzma.LZMAFile (:issue:`52979`)
113
118
- Performance improvement in :func:`concat` with homogeneous ``np.float64`` or ``np.float32`` dtypes (:issue:`52685`)
114
119
- Performance improvement in :meth:`DataFrame.filter` when ``items`` is given (:issue:`52941`)
@@ -288,12 +293,14 @@ Deprecations
288
293
- Deprecated behavior of :func:`assert_series_equal` and :func:`assert_frame_equal` considering NA-like values (e.g. ``NaN`` vs ``None`` as equivalent) (:issue:`52081`)
289
294
- Deprecated constructing :class:`SparseArray` from scalar data, pass a sequence instead (:issue:`53039`)
290
295
- Deprecated falling back to filling when ``value`` is not specified in :meth:`DataFrame.replace` and :meth:`Series.replace` with non-dict-like ``to_replace`` (:issue:`33302`)
296
+
- Deprecated literal json input to :func:`read_json`. Wrap literal json string input in ``io.StringIO`` instead. (:issue:`53409`)
291
297
- Deprecated option "mode.use_inf_as_na", convert inf entries to ``NaN`` before instead (:issue:`51684`)
298
+
- Deprecated parameter ``obj`` in :meth:`GroupBy.get_group` (:issue:`53545`)
292
299
- Deprecated positional indexing on :class:`Series` with :meth:`Series.__getitem__` and :meth:`Series.__setitem__`, in a future version ``ser[item]`` will *always* interpret ``item`` as a label, not a position (:issue:`50617`)
300
+
- Deprecated strings ``T``, ``t``, ``L`` and ``l`` denoting units in :func:`to_timedelta` (:issue:`52536`)
293
301
- Deprecated the "method" and "limit" keywords on :meth:`Series.fillna`, :meth:`DataFrame.fillna`, :meth:`SeriesGroupBy.fillna`, :meth:`DataFrameGroupBy.fillna`, and :meth:`Resampler.fillna`, use ``obj.bfill()`` or ``obj.ffill()`` instead (:issue:`53394`)
294
302
- Deprecated the ``method`` and ``limit`` keywords in :meth:`DataFrame.replace` and :meth:`Series.replace` (:issue:`33302`)
295
303
- Deprecated values "pad", "ffill", "bfill", "backfill" for :meth:`Series.interpolate` and :meth:`DataFrame.interpolate`, use ``obj.ffill()`` or ``obj.bfill()`` instead (:issue:`53581`)
- Performance improvement in :class:`Series` reductions (:issue:`52341`)
321
328
- Performance improvement in :func:`concat` when ``axis=1`` and objects have different indexes (:issue:`52541`)
329
+
- Performance improvement in :func:`concat` when the concatenation axis is a :class:`MultiIndex` (:issue:`53574`)
322
330
- Performance improvement in :meth:`.DataFrameGroupBy.groups` (:issue:`53088`)
323
331
- Performance improvement in :meth:`DataFrame.isin` for extension dtypes (:issue:`53514`)
324
332
- Performance improvement in :meth:`DataFrame.loc` when selecting rows and columns (:issue:`53014`)
@@ -342,6 +350,7 @@ Bug fixes
342
350
343
351
Categorical
344
352
^^^^^^^^^^^
353
+
- Bug in :meth:`Series.astype` with ``dtype="category"`` for nullable arrays with read-only null value masks (:issue:`53658`)
345
354
- Bug in :meth:`Series.map` , where the value of the ``na_action`` parameter was not used if the series held a :class:`Categorical` (:issue:`22527`).
346
355
-
347
356
@@ -350,6 +359,7 @@ Datetimelike
350
359
- :meth:`DatetimeIndex.map` with ``na_action="ignore"`` now works as expected. (:issue:`51644`)
351
360
- Bug in :class:`DateOffset` which had inconsistent behavior when multiplying a :class:`DateOffset` object by a constant (:issue:`47953`)
352
361
- Bug in :func:`date_range` when ``freq`` was a :class:`DateOffset` with ``nanoseconds`` (:issue:`46877`)
362
+
- Bug in :meth:`Timestamp.date`, :meth:`Timestamp.isocalendar` were returning incorrect results for inputs outside those supported by the Python standard library's datetime module (:issue:`53668`)
353
363
- Bug in :meth:`Timestamp.round` with values close to the implementation bounds returning incorrect results instead of raising ``OutOfBoundsDatetime`` (:issue:`51494`)
354
364
- Bug in :meth:`arrays.DatetimeArray.map` and :meth:`DatetimeIndex.map`, where the supplied callable operated array-wise instead of element-wise (:issue:`51977`)
355
365
- Bug in constructing a :class:`Series` or :class:`DataFrame` from a datetime or timedelta scalar always inferring nanosecond resolution instead of inferring from the input (:issue:`52212`)
@@ -360,6 +370,7 @@ Timedelta
360
370
^^^^^^^^^
361
371
- :meth:`TimedeltaIndex.map` with ``na_action="ignore"`` now works as expected (:issue:`51644`)
362
372
- Bug in :class:`TimedeltaIndex` division or multiplication leading to ``.freq`` of "0 Days" instead of ``None`` (:issue:`51575`)
373
+
- Bug in :class:`Timedelta` with Numpy timedelta64 objects not properly raising ``ValueError`` (:issue:`52806`)
363
374
- Bug in :meth:`Timedelta.round` with values close to the implementation bounds returning incorrect results instead of raising ``OutOfBoundsTimedelta`` (:issue:`51494`)
364
375
- Bug in :meth:`arrays.TimedeltaArray.map` and :meth:`TimedeltaIndex.map`, where the supplied callable operated array-wise instead of element-wise (:issue:`51977`)
365
376
-
@@ -401,7 +412,7 @@ Strings
401
412
402
413
Interval
403
414
^^^^^^^^
404
-
-
415
+
-:meth:`pd.IntervalIndex.get_indexer` and :meth:`pd.IntervalIndex.get_indexer_nonunique` raising if ``target`` is read-only array (:issue:`53703`)
405
416
-
406
417
407
418
Indexing
@@ -453,6 +464,7 @@ Plotting
453
464
Groupby/resample/rolling
454
465
^^^^^^^^^^^^^^^^^^^^^^^^
455
466
- Bug in :meth:`DataFrame.resample` and :meth:`Series.resample` in incorrectly allowing non-fixed ``freq`` when resampling on a :class:`TimedeltaIndex` (:issue:`51896`)
467
+
- Bug in :meth:`DataFrame.resample` and :meth:`Series.resample` losing time zone when resampling empty data (:issue:`53664`)
456
468
- Bug in :meth:`DataFrameGroupBy.idxmin`, :meth:`SeriesGroupBy.idxmin`, :meth:`DataFrameGroupBy.idxmax`, :meth:`SeriesGroupBy.idxmax` return wrong dtype when used on empty DataFrameGroupBy or SeriesGroupBy (:issue:`51423`)
457
469
- Bug in weighted rolling aggregations when specifying ``min_periods=0`` (:issue:`51449`)
458
470
- Bug in :meth:`DataFrame.groupby` and :meth:`Series.groupby`, where, when the index of the
@@ -472,6 +484,7 @@ Groupby/resample/rolling
472
484
473
485
Reshaping
474
486
^^^^^^^^^
487
+
- Bug in :func:`concat` coercing to ``object`` dtype when one column has ``pa.null()`` dtype (:issue:`53702`)
475
488
- Bug in :func:`crosstab` when ``dropna=False`` would not keep ``np.nan`` in the result (:issue:`10772`)
476
489
- Bug in :func:`merge_asof` raising ``KeyError`` for extension dtypes (:issue:`52904`)
477
490
- Bug in :func:`merge_asof` raising ``ValueError`` for data backed by read-only ndarrays (:issue:`53513`)
@@ -511,6 +524,7 @@ Metadata
511
524
512
525
Other
513
526
^^^^^
527
+
- Bug in :class:`DataFrame` and :class:`Series` raising for data of complex dtype when ``NaN`` values are present (:issue:`53627`)
514
528
- Bug in :class:`FloatingArray.__contains__` with ``NaN`` item incorrectly returning ``False`` when ``NaN`` values are present (:issue:`52840`)
515
529
- Bug in :func:`api.interchange.from_dataframe` when converting an empty DataFrame object (:issue:`53155`)
516
530
- Bug in :func:`assert_almost_equal` now throwing assertion error for two unequal sets (:issue:`51727`)
0 commit comments