-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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/TST: fix and test for timezone drop in GroupBy.shift/bfill/ffill #27992
Changes from 5 commits
8b38d7a
887c6e7
0812ccf
43b42d5
b5a3735
4b93034
6eb0d28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2220,26 +2220,28 @@ def _get_cythonized_result( | |
base_func = getattr(libgroupby, how) | ||
|
||
for name, obj in self._iterate_slices(): | ||
values = obj._data._values | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I'm not sure relying on underlying block values is the best way to go about this. Is it possible to just work with the obj here instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for my lack of understanding about underlying block values. |
||
|
||
if aggregate: | ||
result_sz = ngroups | ||
else: | ||
result_sz = len(obj.values) | ||
result_sz = len(values) | ||
|
||
if not cython_dtype: | ||
cython_dtype = obj.values.dtype | ||
cython_dtype = values.dtype | ||
|
||
result = np.zeros(result_sz, dtype=cython_dtype) | ||
func = partial(base_func, result, labels) | ||
inferences = None | ||
|
||
if needs_values: | ||
vals = obj.values | ||
vals = values | ||
if pre_processing: | ||
vals, inferences = pre_processing(vals) | ||
func = partial(func, vals) | ||
|
||
if needs_mask: | ||
mask = isna(obj.values).view(np.uint8) | ||
mask = isna(values).view(np.uint8) | ||
func = partial(func, mask) | ||
|
||
if needs_ngroups: | ||
|
@@ -2248,7 +2250,7 @@ def _get_cythonized_result( | |
func(**kwargs) # Call func to modify indexer values in place | ||
|
||
if result_is_index: | ||
result = algorithms.take_nd(obj.values, result) | ||
result = algorithms.take_nd(values, result) | ||
|
||
if post_processing: | ||
result = post_processing(result, inferences) | ||
|
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.
can you move to 0.25.2