Pandas.items in Python2 vs Python3 · Issue #13918 · pandas-dev/pandas (original) (raw)

Inconsistency between python2 and 3 - python2 has no items method (but does have iteritems). Shouldn't items and iteritems be the same?

Code Sample, a copy-pastable example if possible

import pandas as pd
import string
ser = pd.Series(np.arange(10), index=list(string.ascii_letters[:10]))
print(ser.items())

Expected Output

<zip object at 0x11dc1f6c8>

python 2:
AttributeError: 'Series' object has no attribute 'items'

output of pd.show_versions() (python2)

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8

pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 23.0.0
Cython: None
numpy: 1.10.4
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 5.0.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None