1

I have a dict object. I am trying to convert to pandas table .

 {'st_id': 1234, 'dep_id': [{'dept': 16, 'cat: [{'cat_nbr': 8}], 'f_data': [{'fid': '39.3', 'lid': '839.3'}, {'fid': '739.4', 'lid': '9.3'}]}]}

Needed the output in table format. Any suggestion for converting into tables

CodeCool
  • 193
  • 2
  • 12
  • your dict object seems to have a typo : `{'st_id': 1234, 'dep_id': [{'dept': 16, 'cat': [{'cat_nbr': 8}], 'f_data': [{'fid': '39.3', 'lid': '839.3'}, {'fid': '739.4', 'lid': '9.3'}]}]}` ? and what is the expected output? – anky Mar 15 '21 at 16:03
  • Does this seem to answer your question? https://stackoverflow.com/questions/42466639/convert-a-dictionary-to-a-pandas-dataframe – Boskosnitch Mar 15 '21 at 16:04
  • `pd.json_normalize`. – Quang Hoang Mar 15 '21 at 16:04

0 Answers0