Open acmeguy opened 1 year ago
len([i for i, category in enumerate(get_df_row(dimensions, naming))]), len(values) gives: (11274, 9360)
the enumerate is a lot longer than the values
This round trip fails:
js_dataset = pyjstat.Dataset.read(some_df) another_df = js_dataset.write('dataframe')
Another version of a failing roundtrip:
testcase
df_some = pd.DataFrame([
{'Date': '2007-01-01', 'Variables': 'Gasolina 95 E5 Premium', 'value': 1.555},
{'Date': '2007-01-01', 'Variables': 'Gasolina 98 E5 Premium', 'value': 1.681},
{'Date': '2007-01-03', 'Variables': 'Gasolina 95 E5 Premium', 'value': 1.991},
{'Date': '2007-01-03', 'Variables': 'Gasolina 98 E5 Premium', 'value': 1.991},
{'Date': '2007-01-03', 'Variables': 'Gasolina 98 E5 Premium', 'value': 1.991}
])
test_a = pyjstat.Dataset.read(df_some)
test_a_js = test_a.write()
test_b = pyjstat.Dataset.read(test_a_js)
test_b_df = test_b.write('dataframe'). # fails
Line 394: output = pd.DataFrame([category + [values[i]] for i, category in enumerate(get_df_row(dimensions, naming))]) output = pd.DataFrame([category + [values[i]]