Skip to content

DOC: Note itertuples created with rename=True #50836

Closed
@snowman2

Description

@snowman2

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> import pandas
>>> pdf = pandas.DataFrame({"yield": [1, 2]})
>>> pdf
   yield
0      1
1      2
>>> item = next(pdf.itertuples())
>>> item
Pandas(Index=0, _1=1)

Issue Description

The column named "yield" is renamed in itertuples.

Expected Behavior

The column name remains unchanged.

Installed Versions

INSTALLED VERSIONS

commit : 8dab54d
python : 3.9.15.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-58-generic
Version : #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.5.2
numpy : 1.23.5
pytz : 2022.7.1
dateutil : 2.8.2
setuptools : 66.0.0
pip : 22.3.1
Cython : None
pytest : 7.2.1
hypothesis : None
sphinx : 5.3.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.9.3
jinja2 : 3.1.2
IPython : 8.8.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : 1.3.5
brotli :
fastparquet : None
fsspec : 2022.11.0
gcsfs : None
matplotlib : 3.6.2
numba : 0.56.4
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 9.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2022.11.0
scipy : 1.10.0
snappy : None
sqlalchemy : 1.4.46
tables : None
tabulate : 0.9.0
xarray : 2022.12.0
xlrd : None
xlwt : None
zstandard : None
tzdata : 2022.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions