Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
to_datetime parsing bug when using format #4152
Comments
|
FYI, the reason why I want to use |
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this issue
Jul 8, 2013
|
|
jorisvandenbossche |
2b3efa4
|
|
@hayd I don't think so, #3669 was about that the "format" argument was ignored completely. This is about that there seems to be a bug in the parser used when format is given. As an example, it doesn't matter if you give a single string or an array, both give a wrong result: In [12]: pd.to_datetime('01-Apr-2011 00:00:01.978', format= '%d-%b-%Y %H:%M:%S.%f')
Out[12]: Timestamp('2011-03-31 23:24:13.516352', tz=None)
In [14]: pd.to_datetime(np.array(['01-Apr-2011 00:00:01.978']), format= '%d-%b-%Y %H:%M:%S.%f')
Out[14]:
<class 'pandas.tseries.index.DatetimeIndex'>
[2011-03-31 23:24:13.516352]
Length: 1, Freq: None, Timezone: NoneAnd it seems that it has something to do with the parsing of the microseconds: In [17]: pd.to_datetime('01-Apr-2011 00:00:01.000', format= '%d-%b-%Y %H:%M:%S.
Out[17]: Timestamp('2011-04-01 00:00:01', tz=None)
In [18]: pd.to_datetime('01-Apr-2011 00:00:01.001', format= '%d-%b-%Y %H:%M:%S.
Out[18]: Timestamp('2011-04-01 00:16:41', tz=None) |
jorisvandenbossche
referenced
this issue
Jul 8, 2013
Merged
BUG: wrong parsing of microseconds with format arg (#4152) #4166
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this issue
Jul 9, 2013
|
|
jorisvandenbossche |
1cea6bb
|
hayd
closed this
in #4166
Jul 9, 2013
hayd
added a commit
that referenced
this issue
Jul 9, 2013
|
|
hayd |
1a6b967
|
jorisvandenbossche
referenced
this issue
Jul 9, 2013
Closed
failing microsecond formatter test #4179
yarikoptic
added a commit
to neurodebian/pandas
that referenced
this issue
Jul 25, 2013
|
|
yarikoptic |
3275685
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
michaelaye commentedJul 7, 2013