Skip to content

Commit cadfd1c

Browse files
authored
DOC: Added depr note to swapaxes docstrings (#54125)
* Added depr note to swapaxes docstrings * Corrected note
1 parent 2b0ea60 commit cadfd1c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
149149
pandas.api.extensions.ExtensionArray.shape \
150150
pandas.api.extensions.ExtensionArray.tolist \
151151
pandas.DataFrame.pad \
152-
pandas.DataFrame.swapaxes \
153152
pandas.DataFrame.plot \
154153
pandas.DataFrame.to_gbq \
155154
pandas.DataFrame.__dataframe__

pandas/core/generic.py

+8
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,17 @@ def swapaxes(self, axis1: Axis, axis2: Axis, copy: bool_t | None = None) -> Self
771771
"""
772772
Interchange axes and swap values axes appropriately.
773773
774+
.. deprecated:: 2.1.0
775+
``swapaxes`` is deprecated and will be removed.
776+
Please use ``transpose`` instead.
777+
774778
Returns
775779
-------
776780
same as input
781+
782+
Examples
783+
--------
784+
Please see examples for :meth:`DataFrame.transpose`.
777785
"""
778786
warnings.warn(
779787
# GH#51946

0 commit comments

Comments
 (0)