Skip to content

TimedeltaIndexed Series raises ValueError instead of AttributeError #9680

Closed
@JonasAbernot

Description

@JonasAbernot
ts = pd.Series(np.random.normal(size=10),index=pd.timedelta_range(start=0,periods=10,freq='1s'))
ts.foo

raises

ValueError: cannot create timedelta string converter for [foo]

Shouldn't it raise

AttributeError: 'Series' object has no attribute 'foo'

?

pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-46-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8

pandas: 0.16.0rc1-28-gd7d868f
nose: 1.3.1
Cython: 0.20.1post0
numpy: 1.8.2
scipy: 0.13.3
statsmodels: None
IPython: 1.2.1
sphinx: 1.2.2
patsy: None
dateutil: 2.4.1
pytz: 2013b
bottleneck: None
tables: 3.1.1
numexpr: 2.2.2
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: 0.7.5
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
httplib2: 0.8
apiclient: None
sqlalchemy: 0.9.8
pymysql: None
psycopg2: None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions