-
Notifications
You must be signed in to change notification settings - Fork 389
PARSynthesizer: FutureWarnings
in groupby.apply
and Series.__getitem__
from pandas
#2707
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
base: main
Are you sure you want to change the base?
Conversation
if _is_datetime_type(sequence_index[self._sequence_index]): | ||
sequence_index[self._sequence_index] = cast_to_datetime64( | ||
sequence_index[self._sequence_index] | ||
).astype(np.int64) |
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.
Before pandas 2.2, datetime columns stored as object dtypes were silently converted to float dtype. To be consistent with the fill_value
used in L330 or L332, the column has to be numerical.
Let me know if this makes sense
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2707 +/- ##
=======================================
Coverage 97.00% 97.00%
=======================================
Files 74 74
Lines 7770 7776 +6
=======================================
+ Hits 7537 7543 +6
Misses 233 233
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sdv/sequential/par.py
Outdated
diff_series = sequence_index.groupby(self._sequence_key, group_keys=False)[ | ||
self._sequence_index | ||
].transform(lambda s: s.diff().bfill()) |
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 we not use lambda here and have a function instead ?
12c9076
to
01d9a0f
Compare
Resolve #2682
CU-86b6wkybp