Closed
Description
The below fails with "ValueError: Length of values does not match length of index". However, without the timezone it works fine. It's because of pandas/core/frame.py _maybe_casted_values index.tz is not None clause. Something similar was done in #7533 but the added examples don't test this case. cc @sinhrks
import pandas as pd
import numpy as np
dts = pd.date_range('1/1/2012', '1/31/2012', freq='D', tz='US/Eastern')
columns = [1, 2, 3]
data = np.random.randn(31, 3)
frame = pd.DataFrame(data, columns=columns, index=dts)
frame = frame.stack()
frame.reset_index()
Metadata
Metadata
Assignees
Labels
No labels