BUG: fillna() for tz-aware timestamps causes an exception (original) (raw)
Suppose I have a DataFrame of timestamps:
df = pd.DataFrame({'A': [pd.Timestamp('2012-11-11 00:00:00'), pd.Timestamp('2012-11-11 00:00:00')]})
I can attempt to fill any nulls:
In [23]: df.fillna(method='pad') Out[23]: A 0 2012-11-11 1 2012-11-11
Now suppose my timestsamps are tz-aware:
df = pd.DataFrame({'A': [pd.Timestamp('2012-11-11 00:00:00+00:00'), pd.Timestamp('2012-11-11 00:00:00+00:00')]})
This causes an error:
In [25]: df.fillna(method='pad') ... ValueError: total size of new array must be unchanged
This does not appear to be fixed by #14960.