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

CLN: de-kludge quantile, make interpolate_with_fill understand datetime64 #27626

Closed
wants to merge 3 commits into from

Conversation

jbrockmendel
Copy link
Member

2 related-but-separate things here

-quantile: de-kludging the base class method and putting the datetimetz-specific stuff in a subclass method. This will allow us to implement the refactor suggested in #14562. If/when DTA supports 2D, we'll be able to get rid of the subclass override kludge altogether.

  • interpolate_2d: have the core.missing function understand datetime64 dtypes so the blocks don't have to implement special handling. There are only a couple other places where this is needed before we can get rid of the datetimetz-specific try_coerce_result altogether.

@@ -908,7 +908,7 @@ def fast_xs(self, loc):
# Such assignment may incorrectly coerce NaT to None
# result[blk.mgr_locs] = blk._slice((slice(None), loc))
for i, rl in enumerate(blk.mgr_locs):
result[rl] = blk._try_coerce_result(blk.iget((i, loc)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is unrelated to the 2 mentioned in the OP, just an unnecessary call

@@ -1710,7 +1697,6 @@ def putmask(self, mask, new, align=True, inplace=False, axis=0, transpose=False)
mask = _safe_reshape(mask, new_values.shape)

new_values[mask] = new
new_values = self._try_coerce_result(new_values)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to 2 topics mentioned in OP, just unnecessary

@jbrockmendel
Copy link
Member Author

Closing in favor of #27628, #27627.

@jbrockmendel jbrockmendel deleted the coerce5 branch July 28, 2019 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant