TimeSeries.to_dataframe(): Bad columns in output DataFrame when data is empty. #59
Labels
bug
Something isn't working
severity:low
This bug rarely happens and it does not affect the validity of the results
Describe the bug
When a TimeSeries has multidimensional data shape but first dimension is 0 (no data), its to_dataframe() method doesn't produce the right DataFrame columns.
To Reproduce
df = pd.DataFrame(columns=['Data0', 'Data1[0,0]', 'Data1[0,1]',
'Data1[1,0]', 'Data1[1,1]'])
df['Data0'] = np.array([])
df['Data1[0,0]'] = np.array([])
df['Data1[0,1]'] = np.array([])
df['Data1[1,0]'] = np.array([])
df['Data1[1,1]'] = np.array([])
Expected behavior
df and df2 should be identical.
The text was updated successfully, but these errors were encountered: