@@ -357,7 +357,9 @@ def _return_parsed_timezone_results(
357
357
warnings .warn (
358
358
"In a future version of pandas, parsing datetimes with mixed time "
359
359
"zones will raise a warning unless `utc=True`. Please specify `utc=True` "
360
- "to opt in to the new behaviour and silence this warning." ,
360
+ "to opt in to the new behaviour and silence this warning. "
361
+ "To create a `Series` with mixed offsets and `object` dtype, "
362
+ "please use `apply` and `datetime.datetime.strptime`" ,
361
363
FutureWarning ,
362
364
stacklevel = find_stack_level (),
363
365
)
@@ -788,7 +790,8 @@ def to_datetime(
788
790
In a future version of pandas, parsing datetimes with mixed time
789
791
zones will raise a warning unless `utc=True`.
790
792
Please specify `utc=True` to opt in to the new behaviour
791
- and silence this warning.
793
+ and silence this warning. To create a `Series` with mixed offsets and
794
+ `object` dtype, please use `apply` and `datetime.datetime.strptime`.
792
795
793
796
See also: pandas general documentation about `timezone conversion and
794
797
localization
@@ -1021,7 +1024,9 @@ def to_datetime(
1021
1024
... '2020-10-25 04:00 +0100']) # doctest: +SKIP
1022
1025
FutureWarning: In a future version of pandas, parsing datetimes with mixed
1023
1026
time zones will raise a warning unless `utc=True`. Please specify `utc=True`
1024
- to opt in to the new behaviour and silence this warning.
1027
+ to opt in to the new behaviour and silence this warning. To create a `Series`
1028
+ with mixed offsets and `object` dtype, please use `apply` and
1029
+ `datetime.datetime.strptime`.
1025
1030
Index([2020-10-25 02:00:00+02:00, 2020-10-25 04:00:00+01:00],
1026
1031
dtype='object')
1027
1032
@@ -1033,7 +1038,9 @@ def to_datetime(
1033
1038
... datetime(2020, 1, 1, 3, 0)]) # doctest: +SKIP
1034
1039
FutureWarning: In a future version of pandas, parsing datetimes with mixed
1035
1040
time zones will raise a warning unless `utc=True`. Please specify `utc=True`
1036
- to opt in to the new behaviour and silence this warning.
1041
+ to opt in to the new behaviour and silence this warning. To create a `Series`
1042
+ with mixed offsets and `object` dtype, please use `apply` and
1043
+ `datetime.datetime.strptime`.
1037
1044
Index([2020-01-01 01:00:00-01:00, 2020-01-01 03:00:00], dtype='object')
1038
1045
1039
1046
|
0 commit comments