mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Fix docstring formatting
This commit is contained in:
parent
315f94b201
commit
77f9a455e9
@ -1501,8 +1501,8 @@ class DataFrame(NDFrame):
|
|||||||
"""
|
"""
|
||||||
Iterate over eland.DataFrame rows as namedtuples.
|
Iterate over eland.DataFrame rows as namedtuples.
|
||||||
|
|
||||||
Args
|
Parameters
|
||||||
----
|
----------
|
||||||
index: bool, default True
|
index: bool, default True
|
||||||
If True, return the index as the first element of the tuple.
|
If True, return the index as the first element of the tuple.
|
||||||
name: str or None, default "Eland"
|
name: str or None, default "Eland"
|
||||||
@ -1541,6 +1541,7 @@ class DataFrame(NDFrame):
|
|||||||
Eland(Index='4', AvgTicketPrice=730.041778346198, Cancelled=False)
|
Eland(Index='4', AvgTicketPrice=730.041778346198, Cancelled=False)
|
||||||
|
|
||||||
By setting the `index` parameter to False we can remove the index as the first element of the tuple:
|
By setting the `index` parameter to False we can remove the index as the first element of the tuple:
|
||||||
|
|
||||||
>>> for row in df.itertuples(index=False):
|
>>> for row in df.itertuples(index=False):
|
||||||
... print(row)
|
... print(row)
|
||||||
Eland(AvgTicketPrice=841.2656419677076, Cancelled=False)
|
Eland(AvgTicketPrice=841.2656419677076, Cancelled=False)
|
||||||
@ -1550,6 +1551,7 @@ class DataFrame(NDFrame):
|
|||||||
Eland(AvgTicketPrice=730.041778346198, Cancelled=False)
|
Eland(AvgTicketPrice=730.041778346198, Cancelled=False)
|
||||||
|
|
||||||
With the `name` parameter set we set a custom name for the yielded namedtuples:
|
With the `name` parameter set we set a custom name for the yielded namedtuples:
|
||||||
|
|
||||||
>>> for row in df.itertuples(name='Flight'):
|
>>> for row in df.itertuples(name='Flight'):
|
||||||
... print(row)
|
... print(row)
|
||||||
Flight(Index='0', AvgTicketPrice=841.2656419677076, Cancelled=False)
|
Flight(Index='0', AvgTicketPrice=841.2656419677076, Cancelled=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user