Skip to content

DOC: enable docstring on DataFrame.columns/index #20385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add to api.rst
  • Loading branch information
jorisvandenbossche committed Mar 20, 2018
commit c9a8a34f64456d0b68aa0b54de720134f1919089
18 changes: 11 additions & 7 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ Constructor
Attributes
~~~~~~~~~~
**Axes**
* **index**: axis labels

.. autosummary::
:toctree: generated/

Series.index

.. autosummary::
:toctree: generated/
Expand Down Expand Up @@ -845,13 +849,15 @@ Attributes and underlying data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Axes**

* **index**: row labels
* **columns**: column labels
.. autosummary::
:toctree: generated/

DataFrame.index
DataFrame.columns

.. autosummary::
:toctree: generated/

DataFrame.as_matrix
DataFrame.dtypes
DataFrame.ftypes
DataFrame.get_dtype_counts
Expand Down Expand Up @@ -2546,8 +2552,7 @@ objects.
:hidden:

generated/pandas.DataFrame.blocks
generated/pandas.DataFrame.columns
generated/pandas.DataFrame.index
generated/pandas.DataFrame.as_matrix
generated/pandas.DataFrame.ix
generated/pandas.Index.asi8
generated/pandas.Index.data
Expand All @@ -2566,6 +2571,5 @@ objects.
generated/pandas.Series.asobject
generated/pandas.Series.blocks
generated/pandas.Series.from_array
generated/pandas.Series.index
generated/pandas.Series.ix
generated/pandas.Timestamp.offset
5 changes: 3 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6789,8 +6789,9 @@ def isin(self, values):

DataFrame._setup_axes(['index', 'columns'], info_axis=1, stat_axis=0,
axes_are_reversed=True, aliases={'rows': 0},
docs={'index': 'The index of the DataFrame.',
'columns': 'The columns of the DataFrame.'})
docs={
'index': 'The index (row labels) of the DataFrame.',
'columns': 'The column labels of the DataFrame.'})
DataFrame._add_numeric_operations()
DataFrame._add_series_or_dataframe_operations()

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3810,7 +3810,7 @@ def to_period(self, freq=None, copy=True):


Series._setup_axes(['index'], info_axis=0, stat_axis=0, aliases={'rows': 0},
docs={'index': 'The index of the Series.'})
docs={'index': 'The index (axis labels) of the Series.'})
Series._add_numeric_operations()
Series._add_series_only_operations()
Series._add_series_or_dataframe_operations()
Expand Down