We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related #4134 and:
http://stackoverflow.com/questions/18159675/python-pandas-change-duplicate-timestamp-to-unique/18162121#18162121
In [81]: df = DataFrame(dict(time = [Timestamp('20130101 9:01'),Timestamp('20130101 9:02')]))
This is buggy
In [82]: df.time + np.timedelta64(1,'ms') Out[82]: 0 2013-01-01 09:01:00.000000001 1 2013-01-01 09:02:00.000000001 Name: time, dtype: datetime64[ns] In [84]: df.time + np.timedelta64(1,'s') Out[84]: 0 2013-01-01 09:01:00.000000001 1 2013-01-01 09:02:00.000000001 Name: time, dtype: datetime64[ns]
Doesn't work
In [83]: df.time + pd.offsets.Milli(5) ValueError: cannot operate on a series with out a rhs of a series/ndarray of type datetime64[ns] or a timedelta
But this is ok
In [86]: df.time.apply(lambda x: x + pd.offsets.Milli(5)) Out[86]: 0 2013-01-01 09:01:00.005000 1 2013-01-01 09:02:00.005000 Name: time, dtype: datetime64[ns]
This is ok
In [85]: df.time + timedelta(seconds=1) Out[85]: 0 2013-01-01 09:01:01 1 2013-01-01 09:02:01 Name: time, dtype: datetime64[ns]
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Related #4134 and:
http://stackoverflow.com/questions/18159675/python-pandas-change-duplicate-timestamp-to-unique/18162121#18162121
This is buggy
Doesn't work
But this is ok
This is ok
The text was updated successfully, but these errors were encountered: