-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: GH10160 in DataFrame construction from dict with datetime64 index #10269
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
pls rebase on master and repush had an issue in the builds |
@@ -2954,6 +2954,23 @@ def test_constructor_dict_multiindex(self): | |||
df = df.reindex(columns=expected.columns, index=expected.index) | |||
check(df, expected) | |||
|
|||
def test_constructor_dict_datetime64_index(self): | |||
|
|||
data = {1: {np.datetime64('1990-03-15'): 1}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for completeness, pls also do a test (you can use a loop), with datetime.datetime
and Timestamp
(expected should be the same)
lets define a function someting like: put in
then can use in both places. |
Sure I will do that. |
607a87d
to
7ddf7d4
Compare
BUG: GH9456/10160 in Series/DataFrame construction from datetime64 dict Added _dict_compat to deal with datetime64-keyed dict BUG: GH9456 Series construction from dict with datetime64 keys BUG: GH10160 DataFrame construction from nested dict with datetime64 index removed import
@kawochen any progress on this? (e.g. incorporating the Series fix as well) |
Yes I did that a few days ago. I squashed the commits when I rebased (I'm new to github, maybe I shouldn't have?). |
merged via 821542f thanks! FYI, when you push again, I don't know you updated (e.g. there is no notiifcation on that, only on a new PR). So if you want me to have a look, ping! |
closes #10160
closes #9456
where
DataFrame/Series
construction from nesteddict
withdatetime64
index returns aDataFrame\Series
ofNaN
s.