-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
GH-52093 : AttributeError raised with pd.concat between a None and Timestamp #52433
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
df = DataFrame(data) | ||
data_2 = [{"A": pd.to_datetime("1990-12-20 00:00:00+00:00")}] | ||
df_2 = DataFrame(data_2) | ||
pd.concat([df, df_2]) |
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.
pd.concat([df, df_2]) | |
result = pd.concat([df, df_2]) |
And then construct the expected = DataFrame(...)
result and then use tm.assert_frame_equal(result, expected)
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.
Could you add a whatsnew note in v2.0.1.rst
too
Co-authored-by: Matthew Roeschke <[email protected]>
df_2 = DataFrame(data_2) | ||
result = concat([df, df_2]) | ||
expected = DataFrame({"A": [pd.to_datetime("1990-12-20 00:00:00+00:00")]}) | ||
tm.assert_frame_equal(result, expected) |
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.
Looks like this test is failing from the logs
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.
Actually can you please suggest a possible fix
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.
Check the result
and make sure it has the same elements as expected
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.
Actually I tried, but it then says that there is a ValueError
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.