-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: add DatetimeBlockTZ #8260 #10477
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
Conversation
cc @ssanderson |
Ooh, shiny! I'll try this out tonight. |
d86c20d
to
4b9316a
Compare
@jreback Nice! I will try to go through it one of the coming days |
19ec61d
to
2422fe5
Compare
@jreback one quirk I'm noticing is that if you construct a DataFrame directly from a DatetimeIndex, you lose the tz information:
Is this expected behavior? |
Also surprising: if I take a series of dtype
The result I'd expect here is what you actually get from doing
|
do you have the current one? this all works (it might not have in a prior one) |
This is the latest jreback@19ec61d I think
|
I'm testing with a development install of this branch:
|
@ssanderson pretty old branch. pull my latest. |
everthing works except for csv rounding tripping (not sure I can get it as can't repro the tz upon readback) but we'll see, and to/from hdf5 (but soon). |
@ssanderson I have been amending that commit, so for sure update. |
I pulled 2422fe50fcc5aac541a0be8d67a4e86309b3e2ec ~20 minutes ago. The commit hash would change if the content had changed. |
did you make? (it has a tad bit of cython code changes) |
I did a |
sorry, I didn't see what you meant above. |
The from_dict case is working as expected modulo the unexpected type of |
very subtle path difference here....fixing
|
@ssanderson fixed |
if you have a chance I'd like to see how you are actually using it, if you could post some small sample code would be great. I can time things, but having a usecase is even better. |
@jreback I think DataFrame indexing is broken with columns of tz-aware dtype:
|
hmm, let me look. |
6f7a514
to
eaa28ad
Compare
ok, I changed this. So now so:
|
616cbc5
to
d3ae2a3
Compare
@jreback Thanks for this change! Did some quick testing, and some more feedback: What do you guys think what the dtype of
Further, I noticed:
|
fixed the bug:
For the first, converted to UTC and displated as if its
I could be on board with that, except again you lose the fact that this has a meaningful tz, but if you are really accessing |
ok making this change. it actually is exposing some bugs.....:) |
33e747b
to
b340e76
Compare
ok, updated as I described above. |
👍 from me on this proposal. If I'm accessing.values, it's almost always because I care about performance or because I'm doing something numpy-specific.
|
Also +1 on |
ok, pls have a final look if desired. |
Final comment: the series
|
hmm, the interleaving on a |
Ah, yes, that is true. In this case, if it's not too difficult, I would say to coerce them all to datetime64, but leaving as is, is also not that strange then |
fix scalar comparisons vs None generally fix NaT formattting in Series TST: skip postgresql test with tz's update for msgpack Conflicts: pandas/core/base.py pandas/core/categorical.py pandas/core/format.py pandas/tests/test_base.py pandas/util/testing.py full interop for tz-aware Series & timedeltas pandas-dev#10763
I have left it as is. Then this is very consistent and not suddently changed if you add say an 'object' field or whatever. We could always adjust this later. |
ok, bombs away.... the initial impl was only a week or so.....2 months to make it work properly....:> |
closes #8260
closes #10763
ToDos:
Series.dt.*
- [ ] get_values/values - make consistent- [ ] maybe moveDatetimeTZBlock.shift
mostly toDatetimeIndex.shift
Also
DatetimeIndex
and localizing when NaT's are presentDemo