chore: handle pandas v2 and v3 by enforcing datetime freq of millisec#2528
chore: handle pandas v2 and v3 by enforcing datetime freq of millisec#2528haakonvt wants to merge 3 commits intopysdk-release-v8from
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses compatibility issues with Pandas v3 by unifying datetime frequency to milliseconds throughout the application. The changes ensure consistent and correct handling of time-series data, adapting to Pandas' updated inference mechanisms. Additionally, various project dependencies have been updated to their latest stable versions, improving overall stability and leveraging new features. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the handling of datetime units in pandas DataFrames from nanoseconds to milliseconds across the codebase, including the _pandas_helpers.py utility functions and various unit tests. Additionally, it includes numerous dependency updates in poetry.lock, notably upgrading anyio, charset-normalizer, identify, importlib-metadata, jaraco-context, nh3, protobuf, pyjwt, python-discovery, and types-requests. The dependency management for pandas has been refined to support different versions based on the Python environment, with a new entry for pandas 3.0.1 for Python >=3.11 and adjusted markers for pandas and pytz for Python 3.10. There are no review comments to address.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## pysdk-release-v8 #2528 +/- ##
====================================================
- Coverage 93.44% 93.44% -0.01%
====================================================
Files 478 478
Lines 48173 48218 +45
====================================================
+ Hits 45016 45058 +42
- Misses 3157 3160 +3
🚀 New features to boost your workflow:
|
|
I already made a PR for this: #2485
Are all these cases handled here? |
Quite a few changes in pandas v3, specifically around the inference of frequency for datetime-like data: https://pandas.pydata.org/docs/whatsnew/v3.0.0.html#datetime-timedelta-resolution-inference
This PR unifies frequency to always be milliseconds, matching the API closely.