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.23.0.txt
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -314,8 +314,9 @@ The :func:`DataFrame.assign` now accepts dependent keyword arguments for python
314
314
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315
315
316
316
Previously, :meth:`Series.str.cat` did not -- in contrast to most of ``pandas`` -- align :class:`Series` on their index before concatenation (see :issue:`18657`).
317
-
The method has now gained a keyword ``join`` to control the manner of alignment. In v.0.23 it will default to None (meaning no alignment), but this default will change
318
-
to ``'left'`` in a future version of pandas.
317
+
The method has now gained a keyword ``join`` to control the manner of alignment, see examples below and in :ref:`here <text.concatenate>`.
318
+
319
+
In v.0.23 `join` will default to None (meaning no alignment), but this default will change to ``'left'`` in a future version of pandas.
319
320
320
321
.. ipython:: python
321
322
@@ -324,12 +325,9 @@ to ``'left'`` in a future version of pandas.
324
325
s.str.cat(t)
325
326
s.str.cat(t, join='left', na_rep='-')
326
327
327
-
In particular, ``others`` does not need to be of the same length as the calling ``Series`` (if both have an index and ``join is not None``).
328
-
For more examples, see :ref:`here <text.concatenate>`.
329
-
330
-
For categorical data, it is now possible to call :meth:`Series.str.cat` for ``CategoricalIndex`` as well (previously raised a ``ValueError``).
331
-
Finally, if ``others is not None``, the resulting ``Series``/``Index`` will now remain categorical if the calling
332
-
``Series``/``Index`` is categorical.
328
+
Furthermore:
329
+
- meth:`Series.str.cat` now works as well for ``CategoricalIndex`` as well (previously raised a ``ValueError``; see :issue:`20842`)
330
+
- If concatenating with something (i.e. `others is not None`) the resulting ``Series``/``Index`` will now remain categorical if the calling ``Series``/``Index`` is categorical (see :issue:`20843`)
0 commit comments