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/v1.5.0.rst
+39-21Lines changed: 39 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,40 @@ including other versions of pandas.
14
14
Enhancements
15
15
~~~~~~~~~~~~
16
16
17
+
.. _whatsnew_150.enhancements.dataframe_exchange:
18
+
19
+
DataFrame exchange protocol implementation
20
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
+
22
+
Pandas now implement the DataFrame exchange API spec.
23
+
See the full details on the API at https://data-apis.org/dataframe-protocol/latest/index.html
24
+
25
+
The protocol consists of two parts:
26
+
27
+
- New method :meth:`DataFrame.__dataframe__` which produces the exchange object.
28
+
It effectively "exports" the Pandas dataframe as an exchange object so
29
+
any other library which has the protocol implemented can "import" that dataframe
30
+
without knowing anything about the producer except that it makes an exchange object.
31
+
- New function :func:`pandas.api.exchange.from_dataframe` which can take
32
+
an arbitrary exchange object from any conformant library and construct a
33
+
Pandas DataFrame out of it.
34
+
17
35
.. _whatsnew_150.enhancements.styler:
18
36
19
37
Styler
20
38
^^^^^^
21
39
22
-
- New method :meth:`.Styler.to_string` for alternative customisable output methods (:issue:`44502`)
23
-
- Added the ability to render ``border`` and ``border-{side}`` CSS properties in Excel (:issue:`42276`)
24
-
- Added a new method :meth:`.Styler.concat` which allows adding customised footer rows to visualise additional calculations on the data, e.g. totals and counts etc. (:issue:`43875`, :issue:`46186`)
25
-
- :meth:`.Styler.highlight_null` now accepts ``color`` consistently with other builtin methods and deprecates ``null_color`` although this remains backwards compatible (:issue:`45907`)
40
+
The most notable development is the new method :meth:`.Styler.concat` which
41
+
allows adding customised footer rows to visualise additional calculations on the data,
42
+
e.g. totals and counts etc. (:issue:`43875`, :issue:`46186`)
43
+
44
+
Additionally there is an alternative output method :meth:`.Styler.to_string`,
45
+
which allows using the Styler's formatting methods to create, for example, CSVs (:issue:`44502`).
46
+
47
+
Minor feature improvements are:
48
+
49
+
- Adding the ability to render ``border`` and ``border-{side}`` CSS properties in Excel (:issue:`42276`)
50
+
- Making keyword arguments consist: :meth:`.Styler.highlight_null` now accepts ``color`` and deprecates ``null_color`` although this remains backwards compatible (:issue:`45907`)
@@ -79,6 +104,7 @@ as seen in the following example.
79
104
80
105
Other enhancements
81
106
^^^^^^^^^^^^^^^^^^
107
+
- :meth:`Series.map` now raises when ``arg`` is dict but ``na_action`` is not either ``None`` or ``'ignore'`` (:issue:`46588`)
82
108
- :meth:`MultiIndex.to_frame` now supports the argument ``allow_duplicates`` and raises on duplicate labels if it is missing or False (:issue:`45245`)
83
109
- :class:`StringArray` now accepts array-likes containing nan-likes (``None``, ``np.nan``) for the ``values`` parameter in its constructor in addition to strings and :attr:`pandas.NA`. (:issue:`40839`)
84
110
- Improved the rendering of ``categories`` in :class:`CategoricalIndex` (:issue:`45218`)
@@ -94,7 +120,9 @@ Other enhancements
94
120
- :meth:`DataFrame.reset_index` now accepts a ``names`` argument which renames the index names (:issue:`6878`)
95
121
- :meth:`pd.concat` now raises when ``levels`` is given but ``keys`` is None (:issue:`46653`)
96
122
- :meth:`pd.concat` now raises when ``levels`` contains duplicate values (:issue:`46653`)
97
-
- Added ``numeric_only`` argument to :meth:`DataFrame.corr`, :meth:`DataFrame.corrwith`, and :meth:`DataFrame.cov` (:issue:`46560`)
123
+
- Added ``numeric_only`` argument to :meth:`DataFrame.corr`, :meth:`DataFrame.corrwith`, :meth:`DataFrame.cov`, :meth:`DataFrame.idxmin`, :meth:`DataFrame.idxmax`, :meth:`.GroupBy.idxmin`, :meth:`.GroupBy.idxmax`, :meth:`.GroupBy.var`, :meth:`.GroupBy.std`, :meth:`.GroupBy.sem`, and :meth:`.GroupBy.quantile` (:issue:`46560`)
124
+
- A :class:`errors.PerformanceWarning` is now thrown when using ``string[pyarrow]`` dtype with methods that don't dispatch to ``pyarrow.compute`` methods (:issue:`42613`, :issue:`46725`)
125
+
- Added ``validate`` argument to :meth:`DataFrame.join` (:issue:`46622`)
98
126
- A :class:`errors.PerformanceWarning` is now thrown when using ``string[pyarrow]`` dtype with methods that don't dispatch to ``pyarrow.compute`` methods (:issue:`42613`)
99
127
- Added ``numeric_only`` argument to :meth:`Resampler.sum`, :meth:`Resampler.prod`, :meth:`Resampler.min`, :meth:`Resampler.max`, :meth:`Resampler.first`, and :meth:`Resampler.last` (:issue:`46442`)
100
128
@@ -106,13 +134,6 @@ Notable bug fixes
106
134
107
135
These are bug fixes that might have notable behavior changes.
- Fixed bug in :class:`CSSToExcelConverter` leading to ``TypeError`` when border color provided without border style for ``xlsxwriter`` engine (:issue:`42276`)
Serializing tz-naive Timestamps with to_json() with ``iso_dates=True``
@@ -587,7 +601,7 @@ Missing
587
601
- Bug in :meth:`Series.fillna` and :meth:`DataFrame.fillna` with ``downcast`` keyword not being respected in some cases where there are no NA values present (:issue:`45423`)
588
602
- Bug in :meth:`Series.fillna` and :meth:`DataFrame.fillna` with :class:`IntervalDtype` and incompatible value raising instead of casting to a common (usually object) dtype (:issue:`45796`)
589
603
- Bug in :meth:`DataFrame.interpolate` with object-dtype column not returning a copy with ``inplace=False`` (:issue:`45791`)
590
-
-
604
+
- Bug in :meth:`DataFrame.dropna` allows to set both ``how`` and ``thresh`` incompatible arguments (:issue:`46575`)
591
605
592
606
MultiIndex
593
607
^^^^^^^^^^
@@ -619,6 +633,8 @@ Period
619
633
^^^^^^
620
634
- Bug in subtraction of :class:`Period` from :class:`PeriodArray` returning wrong results (:issue:`45999`)
621
635
- Bug in :meth:`Period.strftime` and :meth:`PeriodIndex.strftime`, directives ``%l`` and ``%u`` were giving wrong results (:issue:`46252`)
636
+
- Bug in inferring an incorrect ``freq`` when passing a string to :class:`Period` microseconds that are a multiple of 1000 (:issue:`46811`)
637
+
- Bug in constructing a :class:`Period` from a :class:`Timestamp` or ``np.datetime64`` object with non-zero nanoseconds and ``freq="ns"`` incorrectly truncating the nanoseconds (:issue:`46811`)
622
638
-
623
639
624
640
Plotting
@@ -629,6 +645,7 @@ Plotting
629
645
- Bug in :meth:`DataFrame.boxplot` that prevented specifying ``vert=False`` (:issue:`36918`)
630
646
- Bug in :meth:`DataFrame.plot.scatter` that prevented specifying ``norm`` (:issue:`45809`)
631
647
- The function :meth:`DataFrame.plot.scatter` now accepts ``color`` as an alias for ``c`` and ``size`` as an alias for ``s`` for consistency to other plotting functions (:issue:`44670`)
648
+
- Fix showing "None" as ylabel in :meth:`Series.plot` when not setting ylabel (:issue:`46129`)
632
649
633
650
Groupby/resample/rolling
634
651
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -645,6 +662,7 @@ Groupby/resample/rolling
645
662
- Bug in :meth:`GroupBy.max` with empty groups and ``uint64`` dtype incorrectly raising ``RuntimeError`` (:issue:`46408`)
646
663
- Bug in :meth:`.GroupBy.apply` would fail when ``func`` was a string and args or kwargs were supplied (:issue:`46479`)
647
664
- Bug in :meth:`SeriesGroupBy.apply` would incorrectly name its result when there was a unique group (:issue:`46369`)
665
+
- Bug in :meth:`Rolling.sum` and :meth:`Rolling.mean` would give incorrect result with window of same values (:issue:`42064`, :issue:`46431`)
648
666
- Bug in :meth:`Rolling.var` and :meth:`Rolling.std` would give non-zero result with window of same values (:issue:`42064`)
649
667
- Bug in :meth:`.Rolling.var` would segfault calculating weighted variance when window size was larger than data size (:issue:`46760`)
650
668
- Bug in :meth:`Grouper.__repr__` where ``dropna`` was not included. Now it is (:issue:`46754`)
@@ -672,7 +690,7 @@ ExtensionArray
672
690
Styler
673
691
^^^^^^
674
692
- Bug when attempting to apply styling functions to an empty DataFrame subset (:issue:`45313`)
675
-
-
693
+
- Bug in :class:`CSSToExcelConverter` leading to ``TypeError`` when border color provided without border style for ``xlsxwriter`` engine (:issue:`42276`)
0 commit comments