We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running on the REPL with Python 2.7:
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org >>> import pandas as pd >>> s = pd.Series([1, 2, 3]) >>> for _, x in s.items(): ... print(x) ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/depalati/miniconda3/envs/py27/lib/python2.7/site-packages/pandas/core/generic.py", line 2966, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'items'
On Python 3.6:
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pandas as pd >>> s = pd.Series([1, 2, 3]) >>> for _, x in s.items(): ... print(x) ... 1 2 3 >>>
The Series.items method is mysteriously absent on Python 2.7, though Series.iteritems works fine on both legacy and modern Python.
Series.items
Series.iteritems
Series.items should iterate over (index, value) tuples.
pd.show_versions()
commit: None python: 2.7.13.final.0 python-bits: 64 OS: Darwin OS-release: 16.0.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None
pandas: 0.20.3 pytest: 3.2.1 pip: 9.0.1 setuptools: 27.2.0 Cython: None numpy: 1.11.3 scipy: 0.18.1 xarray: None IPython: 5.1.0 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: None tables: 3.3.0 numexpr: 2.6.1 feather: None matplotlib: 1.5.1 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.4 s3fs: None pandas_gbq: None pandas_datareader: None
The text was updated successfully, but these errors were encountered:
This was fixed (recently) in #17214 and will be in the next release.
Sorry, something went wrong.
Thanks!
No branches or pull requests
Code Sample, a copy-pastable example if possible
Running on the REPL with Python 2.7:
On Python 3.6:
Problem description
The
Series.items
method is mysteriously absent on Python 2.7, thoughSeries.iteritems
works fine on both legacy and modern Python.Expected Output
Series.items
should iterate over (index, value) tuples.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Darwin
OS-release: 16.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.20.3
pytest: 3.2.1
pip: 9.0.1
setuptools: 27.2.0
Cython: None
numpy: 1.11.3
scipy: 0.18.1
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: 3.3.0
numexpr: 2.6.1
feather: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.4
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: