-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
BUG: Implement interpolating NaT values in datetime series #17709
Conversation
Hello @scls19fr! Thanks for updating the PR.
Comment last updated on September 28, 2017 at 19:41 Hours UTC |
If I change test from
to
unit test doesn't pass this is because of
Any idea? |
Codecov Report
@@ Coverage Diff @@
## master #17709 +/- ##
==========================================
+ Coverage 91.24% 91.26% +0.01%
==========================================
Files 163 163
Lines 49766 49773 +7
==========================================
+ Hits 45411 45423 +12
+ Misses 4355 4350 -5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #17709 +/- ##
==========================================
+ Coverage 91.24% 91.26% +0.01%
==========================================
Files 163 163
Lines 49766 49773 +7
==========================================
+ Hits 45411 45423 +12
+ Misses 4355 4350 -5
Continue to review full report at Codecov.
|
is_datetime64tz_dtype(self)) and self.isnull().any(): | ||
s2 = self.astype('i8').astype('f8') | ||
s2[self.isnull()] = np.nan | ||
return to_datetime(s2.interpolate(*args, **kwargs)) |
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.
I think you'll need to handle timezone information here. Once you do the .astype('i8')
all TZ info is gone.
If someone has timezones, should it be tz_convert('UTC') -> interploate -> tz_localize("UTC") -> tz_convert(original)
?
We'll want to test this around DST transitions...
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.
this should not be done here at all, rather in pandas.core.missing.py
is_datetime64tz_dtype(self)) and self.isnull().any(): | ||
s2 = self.astype('i8').astype('f8') | ||
s2[self.isnull()] = np.nan | ||
return to_datetime(s2.interpolate(*args, **kwargs)) |
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.
this should not be done here at all, rather in pandas.core.missing.py
can you rebase an respond to comments. |
I do not have time right now. Sorry |
git diff upstream/master -u -- "*.py" | flake8 --diff