Open glemaitre opened 1 week ago
The remaining pandas error is:
E TypeError: Cannot use .astype to convert from timezone-naive dtype to timezone-aware dtype. Use obj.tz_localize instead or series.dt.tz_localize instead
I assume we try to cast
.
@glemaitre here is the fix for the time zone failures (pandas changes the representation of time zones in 3.0):
diff --git a/skrub/_to_datetime.py b/skrub/_to_datetime.py
index 4a08013f..a14d3c8a 100644
--- a/skrub/_to_datetime.py
+++ b/skrub/_to_datetime.py
@@ -28,6 +28,8 @@ def _get_time_zone_pandas(col):
return None
if hasattr(tz, "zone"):
return tz.zone
+ if hasattr(tz, "key"):
+ return tz.key
return tz.tzname(None)
Adapt the code with changes of related to some changes in the developer API that became public in scikit-learn.