Skip to content

Commit a5686bb

Browse files
committed
Merge pull request #11860 from mortada/iter_typos
DOC: typos in DataFrame.iterrows and itertuples docstrings
2 parents ee9da4a + 89f04da commit a5686bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/source/basics.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ To iterate over the rows of a DataFrame, you can use the following methods:
12121212
This converts the rows to Series objects, which can change the dtypes and has some
12131213
performance implications.
12141214
* :meth:`~DataFrame.itertuples`: Iterate over the rows of a DataFrame
1215-
as namedtuples of the values. This is a lot faster as
1215+
as namedtuples of the values. This is a lot faster than
12161216
:meth:`~DataFrame.iterrows`, and is in most cases preferable to use
12171217
to iterate over the values of a DataFrame.
12181218

@@ -1344,7 +1344,7 @@ and is generally faster as :meth:`~DataFrame.iterrows`.
13441344

13451345
.. note::
13461346

1347-
The columns names will be renamed to positional names if they are
1347+
The column names will be renamed to positional names if they are
13481348
invalid Python identifiers, repeated, or start with an underscore.
13491349
With a large number of columns (>255), regular tuples are returned.
13501350

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def iterrows(self):
630630
631631
To preserve dtypes while iterating over the rows, it is better
632632
to use :meth:`itertuples` which returns namedtuples of the values
633-
and which is generally faster as ``iterrows``.
633+
and which is generally faster than ``iterrows``.
634634
635635
2. You should **never modify** something you are iterating over.
636636
This is not guaranteed to work in all cases. Depending on the
@@ -667,7 +667,7 @@ def itertuples(self, index=True, name="Pandas"):
667667
668668
Notes
669669
-----
670-
The columns names will be renamed to positional names if they are
670+
The column names will be renamed to positional names if they are
671671
invalid Python identifiers, repeated, or start with an underscore.
672672
With a large number of columns (>255), regular tuples are returned.
673673

0 commit comments

Comments
 (0)