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

fillna() on Series or DataFrame containing datetime64 mess the values #6587

Closed
yonil7 opened this issue Mar 10, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@yonil7
Copy link

commented Mar 10, 2014

s = pd.Series([pd.NaT, pd.NaT, '2013-08-05 15:30:00.000001'])
print s
0 NaT
1 NaT
2 2013-08-05 15:30:00.000001
dtype: datetime64[ns]

print s.fillna(method='backfill')
0 2013-08-05 15:30:00.000001024
1 2013-08-05 15:30:00.000001024
2 2013-08-05 15:30:00.000001024
dtype: datetime64[ns]

This happens with pandas 0.13.1 and numpy 1.8.0

@jreback

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2014

hmm...looks like a rounding/precision issue.

care to have a look into this?

@jreback jreback added Bug labels Mar 10, 2014

@jreback jreback added this to the 0.14.0 milestone Mar 10, 2014

@jreback

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2014

its sending this to the method with the dtype stripped, so it ends up converting to float and back (rather than using the correct datetime routines)....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.