File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 4545 tzconversion ,
4646)
4747from pandas ._libs .tslibs .dtypes import abbrev_to_npy_unit
48- from pandas .errors import PerformanceWarning , TimezoneDtypeMismatchError
48+ from pandas .errors import (
49+ PerformanceWarning ,
50+ TimezoneDtypeMismatchError ,
51+ )
4952from pandas .util ._exceptions import find_stack_level
5053from pandas .util ._validators import validate_inclusive
5154
Original file line number Diff line number Diff line change @@ -1098,13 +1098,13 @@ def maybe_cast_to_datetime(
10981098 dta = DatetimeArray ._from_sequence (value , dtype = dtype )
10991099 except TimezoneDtypeMismatchError as err :
11001100 raise ValueError (
1101- "Cannot convert timezone-aware data to "
1102- "timezone-naive dtype. Use "
1103- "pd.Series(values).dt.tz_localize(None) instead."
1104- ) from err
1101+ "Cannot convert timezone-aware data to "
1102+ "timezone-naive dtype. Use "
1103+ "pd.Series(values).dt.tz_localize(None) instead."
1104+ ) from err
11051105 except ValueError :
1106- raise
1107-
1106+ raise
1107+
11081108 return dta
11091109
11101110
You can’t perform that action at this time.
0 commit comments