Skip to content
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

Assigning a timestamp value to a Series create an int instead #21143

Closed
jimbasquiat opened this issue May 20, 2018 · 1 comment
Closed

Assigning a timestamp value to a Series create an int instead #21143

jimbasquiat opened this issue May 20, 2018 · 1 comment
Labels
Datetime Datetime data dtype Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request

Comments

@jimbasquiat
Copy link

g = pd.Series(dict(a = 5, b =datetime(2018, 1,1)))
g['datetime'] = pd.Timestamp('2018-01-02')

g returns:

a                             5
b           2018-01-01 00:00:00
datetime    1514851200000000000
dtype: object

It seems this is a bug, I asked the question on SO and found a workaround, but might be useful to investigate further and fix the bug.

@mroeschke
Copy link
Member

Thanks for the report. Users have reported this issue in #13910 and #18410. Investigation and pull requests are always welcome!

@mroeschke mroeschke added Duplicate Report Duplicate issue or pull request Datetime Datetime data dtype Dtype Conversions Unexpected or buggy dtype conversions labels May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants