BUG: Series(dt64_data, dtype=tzaware) vs Series(dt64_data).astype(tzaware) #49281
Labels
API - Consistency
Internal Consistency of API/Behavior
Astype
Bug
Constructors
Series/DataFrame/Index/pd.array Constructors
Timeseries
As a general rule, we want
Series(data, dtype=dtype)
to behave likeSeries(data).astype(dtype)
, but that does not hold for datetime64 data with a DatetimeTZDtype.Options are
a) live with this inconsistency
b) deprecate Series constructor behavior to disallow this (and DatetimeIndex/DatetimeArray along with it)
c) re-allow the .astype casting
The text was updated successfully, but these errors were encountered: