-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Nanoseconds being truncated in asof #3375
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
Comments
can you show pandas version, platform, and get_info? |
pandas version = .10 get_info is a huge huge dataframe that is indexed by a timeseries. I think we should be fine without? FYI if I use match_price = get_info[get_info.index[0]] I get the same problem and error |
of course, just want to see a reproducible sample (you can put random data) |
related to #3060 0.11rc1
The errors
|
when writing
the index access should work with #3060 now. The major problem here is, that timestrings are parsed with python datetime when creating a Timestamp object. This ignores nanosecond values. It may break a lot of things, but wouldnt it be better to use np.datetime64 to parse timestamp strings? |
http://comments.gmane.org/gmane.comp.python.pydata/688 the issue is dateutil which truncates can't use numpy parser as its broken in < 1.7 |
Maybe the only (performant) way to improve the situation is to reimplement the dateutil parser which is pure python at the moment. |
it's possible that we do parse a few common formats in cython/c and fallback to parse |
IIRC this is fixed by some recent work in 0.15.0. If still not working, pls open a new issue. |
match_time = get_info.index.asof(trade_time)
match_price = get_info[match_time]['Bid Price']
The actual index value:
<Timestamp: 2013-04-10 10:22:01.696815975-0500 CDT, tz=US/Central>
The error returned:
KeyError: u'no item named 2013-04-10 10:22:01.696815-05:00'
It seems to me that it is cutting off the last digits of the timestamp in this example.
The text was updated successfully, but these errors were encountered: