Skip to content

Commit ffe4688

Browse files
gboekerpmhatre1
authored andcommitted
DOC: Fix SA01 Docstring Errors for DataFrame (pandas-dev#58364)
* DataFrame.__iter__ fix SA01 * add See Also for DataFrame.column * DataFrame.droplevel SA01 fixed * remove pandas.Series.droplevel from code_checks.sh
1 parent e4f6cac commit ffe4688

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8080
-i "pandas.CategoricalIndex.codes SA01" \
8181
-i "pandas.CategoricalIndex.ordered SA01" \
8282
-i "pandas.DataFrame.__dataframe__ SA01" \
83-
-i "pandas.DataFrame.__iter__ SA01" \
8483
-i "pandas.DataFrame.at_time PR01" \
85-
-i "pandas.DataFrame.columns SA01" \
86-
-i "pandas.DataFrame.droplevel SA01" \
8784
-i "pandas.DataFrame.hist RT03" \
8885
-i "pandas.DataFrame.infer_objects RT03" \
8986
-i "pandas.DataFrame.kurt RT03,SA01" \
@@ -277,7 +274,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
277274
-i "pandas.Series.cat.reorder_categories PR01,PR02" \
278275
-i "pandas.Series.cat.set_categories PR01,PR02" \
279276
-i "pandas.Series.div PR07" \
280-
-i "pandas.Series.droplevel SA01" \
281277
-i "pandas.Series.dt.as_unit PR01,PR02" \
282278
-i "pandas.Series.dt.ceil PR01,PR02" \
283279
-i "pandas.Series.dt.components SA01" \

pandas/core/frame.py

+4
Original file line numberDiff line numberDiff line change
@@ -12893,6 +12893,10 @@ def isin_(x):
1289312893
"""
1289412894
The column labels of the DataFrame.
1289512895
12896+
See Also
12897+
--------
12898+
DataFrame.index: The index (row labels) of the DataFrame.
12899+
1289612900
Examples
1289712901
--------
1289812902
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})

pandas/core/generic.py

+11
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,12 @@ def droplevel(self, level: IndexLabel, axis: Axis = 0) -> Self:
783783
{klass}
784784
{klass} with requested index / column level(s) removed.
785785
786+
See Also
787+
--------
788+
DataFrame.replace : Replace values given in `to_replace` with `value`.
789+
DataFrame.pivot : Return reshaped DataFrame organized by given
790+
index / column values.
791+
786792
Examples
787793
--------
788794
>>> df = (
@@ -1862,6 +1868,11 @@ def __iter__(self) -> Iterator:
18621868
iterator
18631869
Info axis as iterator.
18641870
1871+
See Also
1872+
--------
1873+
DataFrame.items : Iterate over (column name, Series) pairs.
1874+
DataFrame.itertuples : Iterate over DataFrame rows as namedtuples.
1875+
18651876
Examples
18661877
--------
18671878
>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})

0 commit comments

Comments
 (0)