Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95b4f5a

Browse files
DOC: Document preservation of boolean dtype in pivot_table and unstack
- Added release note to v3.0.0.rst under Enhancements and Bug fixes, describing that boolean columns are now preserved as nullable BooleanDtype in pivoting and unstacking operations, with missing values as pd.NA. - References issue #62244.
1 parent 16e0f67 commit 95b4f5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎doc/source/whatsnew/v3.0.0.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Other enhancements
163163
- :class:`pandas.api.typing.SASReader` is available for typing the output of :func:`read_sas` (:issue:`55689`)
164164
- Added :meth:`.Styler.to_typst` to write Styler objects to file, buffer or string in Typst format (:issue:`57617`)
165165
- Added missing :meth:`pandas.Series.info` to API reference (:issue:`60926`)
166+
- Pivoting or unstacking boolean columns (e.g., with :meth:`DataFrame.pivot_table`, :meth:`DataFrame.unstack`) now preserves them as nullable BooleanDtype, with missing values as ``pd.NA`` for improved memory usage and correctness. (:issue:`62244`)
166167
- :class:`pandas.api.typing.NoDefault` is available for typing ``no_default``
167168
- :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`)
168169
- :func:`pandas.merge` now validates the ``how`` parameter input (merge type) (:issue:`59435`)
@@ -292,6 +293,7 @@ These improvements also fixed certain bugs in groupby:
292293
- :meth:`.DataFrameGroupBy.nunique` would fail when there are multiple groupings, unobserved groups, and ``as_index=False`` (:issue:`52848`)
293294
- :meth:`.DataFrameGroupBy.sum` would have incorrect values when there are multiple groupings, unobserved groups, and non-numeric data (:issue:`43891`)
294295
- :meth:`.DataFrameGroupBy.value_counts` would produce incorrect results when used with some categorical and some non-categorical groupings and ``observed=False`` (:issue:`56016`)
296+
- Fixed boolean columns being upcast to float or object in :meth:`DataFrame.pivot_table` and :meth:`DataFrame.unstack`; these now remain as nullable BooleanDtype with missing values as ``pd.NA``. (:issue:`62244`)
295297

296298
.. _whatsnew_300.notable_bug_fixes.notable_bug_fix2:
297299

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /