Skip to content

Commit 37b3774

Browse files
yonashubyonas kassaMarcoGorelli
authored
DOC: improve description of the example which dataframe has two rows (#36971)
* fix issue 36970 improve description of the examplewhich dataframe has two rows * improve description of example improve description of the example which dataframe has two rows * improve description of the example describing mode operation. * remove trailing extra line * preserve newline Co-authored-by: yonas kassa <[email protected]> Co-authored-by: Marco Gorelli <[email protected]>
1 parent 6c1c5c6 commit 37b3774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8950,8 +8950,8 @@ def mode(self, axis=0, numeric_only=False, dropna=True) -> DataFrame:
89508950
ostrich bird 2 NaN
89518951
89528952
By default, missing values are not considered, and the mode of wings
8953-
are both 0 and 2. The second row of species and legs contains ``NaN``,
8954-
because they have only one mode, but the DataFrame has two rows.
8953+
are both 0 and 2. Because the resulting DataFrame has two rows,
8954+
the second row of ``species`` and ``legs`` contains ``NaN``.
89558955
89568956
>>> df.mode()
89578957
species legs wings

0 commit comments

Comments
 (0)