Skip to content

DatetimeIndex should accept list of integers #1303

New issue

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

Closed
wesm opened this issue May 23, 2012 · 0 comments
Closed

DatetimeIndex should accept list of integers #1303

wesm opened this issue May 23, 2012 · 0 comments
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@wesm
Copy link
Member

wesm commented May 23, 2012

brought up by #1263

In [5]: DatetimeIndex(ujson.decode(ujson.encode(rng)))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/wesm/code/pandas/<ipython-input-5-e33bac335db8> in <module>()
----> 1 DatetimeIndex(ujson.decode(ujson.encode(rng)))

/home/wesm/code/pandas/pandas/tseries/index.pyc in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, **kwds)
    227                 data = _str_to_dt_array(data, offset)
    228             else:
--> 229                 data = tools.to_datetime(data)
    230                 data = np.asarray(data, dtype='M8[ns]')
    231 

/home/wesm/code/pandas/pandas/tseries/tools.pyc in to_datetime(arg, errors, dayfirst)
     93         return lib.string_to_datetime(com._ensure_object(arg),
     94                                       raise_=errors == 'raise',
---> 95                                       dayfirst=dayfirst)
     96 
     97     try:

/home/wesm/code/pandas/pandas/_tseries.so in pandas._tseries.string_to_datetime (pandas/src/tseries.c:34314)()

TypeError: object of type 'long' has no len()
@wesm wesm closed this as completed in 737c5ce May 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

1 participant