Force utc convertion in backend pandas to_datetime function#1955
Force utc convertion in backend pandas to_datetime function#1955schafsam wants to merge 2 commits intounionai-oss:mainfrom
Conversation
Allow mixed time zone and shift them to utc while converting to datetime.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1955 +/- ##
===========================================
- Coverage 94.28% 81.58% -12.70%
===========================================
Files 91 121 +30
Lines 7013 9396 +2383
===========================================
+ Hits 6612 7666 +1054
- Misses 401 1730 +1329 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @schafsam, looks like the
Can't this be addressed by adding |
|
Hi @cosmicBboy That was the second thought to handle it with |
If you provide a code snippet I can help out |
Allow mixed timezone and shift them to utc while converting to datetime fixes #1309. The
_to_datetimefunction seems to check for the timezone and adds it afterwards.Adding the
utc=Trueargument to the to_datetime function works withpandasandmodin.pandas.to_datetime. I tried it and forpyspark.pandasbut failed already with the import of the engine. Therefore, I assume pyspark might be secondary.