I have a Python dictionary and I am unable to convert key and value of dictionary to a dataframe column.
import pandas as pd
data={'form-0-publish': ['05/28/2019'], 'form-0-cell': ['81'], 'form-0-cell_name': ['13a'], 'form-0-jam': ['07.00-08.00'], 'form-0-target': ['60'],
'form-1-publish': ['05/28/2019'], 'form-1-cell': ['81'], 'form-1-cell_name': ['13a'], 'form-1-jam': ['07.00-08.00'], 'form-1-target': ['60'],
'form-2-publish': ['05/28/2019'], 'form-2-cell': ['81'], 'form-2-cell_name': ['13a'], 'form-2-jam': ['07.00-08.00'], 'form-2-target': ['60'],
}
df = pd.DataFrame(data.items(), columns=['FormPublish', 'DatePublish', 'FormCell', 'Cell', 'FormCellName', 'FormCellName', 'FormJam', 'Jam', 'FormTarget', 'Target'])
df
Expected result:
> FormPublish DatePublish FormCell Cell FormCellName FormCellName
> FormJam Jam FormTarget Target 0 form-0-publish ['05/28/2019'] ... 1
> form-0-publish ['05/28/2019'] ... 3 form-0-publish ['05/28/2019'] ...