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.19.0.txt
+33-1
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ Highlights include:
15
15
16
16
- :func:`merge_asof` for asof-style time-series joining, see :ref:`here <whatsnew_0190.enhancements.asof_merge>`
17
17
- ``.rolling()`` are now time-series aware, see :ref:`here <whatsnew_0190.enhancements.rolling_ts>`
18
+
- :func:`read_csv` now supports parsing ``Categorical`` data, see :ref:`here <whatsnew_0190.enhancements.read_csv_categorical>`
19
+
- A function :func:`union_categorical` has been added for combining categoricals, see :ref:`here <whatsnew_0190.enhancements.union_categoricals>`
18
20
- pandas development api, see :ref:`here <whatsnew_0190.dev_api>`
19
21
- ``PeriodIndex`` now has its own ``period`` dtype, and changed to be more consistent with other ``Index`` classes. See :ref:`here <whatsnew_0190.api.period>`
20
22
- Sparse data structures now gained enhanced support of ``int`` and ``bool`` dtypes, see :ref:`here <whatsnew_0190.sparse>`
@@ -277,6 +279,37 @@ Individual columns can be parsed as a ``Categorical`` using a dict specification
- A function :func:`union_categoricals` has been added for combining categoricals, see :ref:`Unioning Categoricals<categorical.union>` (:issue:`13361`, :issue:`:13763`, issue:`13846`)
288
+
289
+
.. ipython:: python
290
+
291
+
from pandas.types.concat import union_categoricals
292
+
a = pd.Categorical(["b", "c"])
293
+
b = pd.Categorical(["a", "b"])
294
+
union_categoricals([a, b])
295
+
296
+
- ``concat`` and ``append`` now can concat unordered ``category`` dtypes using ``union_categorical`` internally. (:issue:`13524`)
297
+
298
+
By default, different categories results in ``object`` dtype.
299
+
300
+
.. ipython:: python
301
+
302
+
s1 = pd.Series(['a', 'b'], dtype='category')
303
+
s2 = pd.Series(['b', 'c'], dtype='category')
304
+
pd.concat([s1, s2])
305
+
306
+
Specifying ``union_categoricals=True`` allows to concat categories following
- ``DataFrame`` has gained the ``.asof()`` method to return the last non-NaN values according to the selected subset (:issue:`13358`)
449
482
- The ``DataFrame`` constructor will now respect key ordering if a list of ``OrderedDict`` objects are passed in (:issue:`13304`)
450
483
- ``pd.read_html()`` has gained support for the ``decimal`` option (:issue:`12907`)
451
-
- A function :func:`union_categorical` has been added for combining categoricals, see :ref:`Unioning Categoricals<categorical.union>` (:issue:`13361`, :issue:`:13763`, :issue:`13846`)
452
484
- ``Series`` has gained the properties ``.is_monotonic``, ``.is_monotonic_increasing``, ``.is_monotonic_decreasing``, similar to ``Index`` (:issue:`13336`)
453
485
- ``DataFrame.to_sql()`` now allows a single value as the SQL type for all columns (:issue:`11886`).
454
486
- ``Series.append`` now supports the ``ignore_index`` option (:issue:`13677`)
0 commit comments