TimedeltaIndex constructor gives wild output · Issue #9011 · pandas-dev/pandas (original) (raw)
import pandas as pd a = pd.TimedeltaIndex(range(3),unit='S') print (a[1])
gives output
I would expect the same output as from
import pandas as pd import numpy as np npa = np.array(range(3),dtype='timedelta64[s]') a = pd.TimedeltaIndex(npa) print(a[1])
giving output
This is pandas 0.15.1 as installed by conda update pandas from a fresh python 3.4 install of anaconda.
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: nb_NO
pandas: 0.15.1
nose: 1.3.4
Cython: 0.21
numpy: 1.9.1
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.2.0
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.1
pytz: 2014.9
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.0
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: None
xlsxwriter: 0.5.7
lxml: 3.4.0
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.7
pymysql: None
psycopg2: None