From 87e2e7b63d9c33794c695696704d44f5c9bb37b5 Mon Sep 17 00:00:00 2001 From: fbourgey Date: Mon, 19 Aug 2024 12:18:33 -0400 Subject: [PATCH 1/3] merged DataFrame.index and DataFrame.columns with other Axes section. --- doc/source/reference/frame.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/source/reference/frame.rst b/doc/source/reference/frame.rst index 7680c8b434866..e0c2e66e5b6ce 100644 --- a/doc/source/reference/frame.rst +++ b/doc/source/reference/frame.rst @@ -16,17 +16,11 @@ Constructor Attributes and underlying data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Axes** - .. autosummary:: :toctree: api/ DataFrame.index DataFrame.columns - -.. autosummary:: - :toctree: api/ - DataFrame.dtypes DataFrame.info DataFrame.select_dtypes From a1e9fd0b7f5f3a554aa22706acced93e4fe86268 Mon Sep 17 00:00:00 2001 From: fbourgey Date: Wed, 21 Aug 2024 13:55:48 -0400 Subject: [PATCH 2/3] small clean for DataFrame.columns --- pandas/core/frame.py | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b84fb33af26e5..4d4467cf586cb 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -13488,26 +13488,29 @@ def isin_(x): ) columns = properties.AxisProperty( axis=0, - doc=dedent( - """ - The column labels of the DataFrame. - - See Also - -------- - DataFrame.index: The index (row labels) of the DataFrame. - DataFrame.axes: Return a list representing the axes of the DataFrame. - - Examples - -------- - >>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}) - >>> df - A B - 0 1 3 - 1 2 4 - >>> df.columns - Index(['A', 'B'], dtype='object') - """ - ), + doc=""" + The column labels of the DataFrame. + + Returns + ------- + pandas.Index + The column labels of the DataFrame. + + See Also + -------- + DataFrame.index: The index (row labels) of the DataFrame. + DataFrame.axes: Return a list representing the axes of the DataFrame. + + Examples + -------- + >>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}) + >>> df + A B + 0 1 3 + 1 2 4 + >>> df.columns + Index(['A', 'B'], dtype='object') + """, ) # ---------------------------------------------------------------------- From 925215e044f4a6ecccf00506e2b027beed8a4634 Mon Sep 17 00:00:00 2001 From: fbourgey Date: Thu, 5 Sep 2024 21:40:41 -0400 Subject: [PATCH 3/3] reverted frame.rst file --- doc/source/reference/frame.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/reference/frame.rst b/doc/source/reference/frame.rst index e0c2e66e5b6ce..7680c8b434866 100644 --- a/doc/source/reference/frame.rst +++ b/doc/source/reference/frame.rst @@ -16,11 +16,17 @@ Constructor Attributes and underlying data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**Axes** + .. autosummary:: :toctree: api/ DataFrame.index DataFrame.columns + +.. autosummary:: + :toctree: api/ + DataFrame.dtypes DataFrame.info DataFrame.select_dtypes