Skip to content

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.

# 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

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