![]() This will convert any json structure into a flat excel table, with the keys from your json in column A and the corresponding values in column B: import json How can I convert entire json to excel irrespective of the json structure which can give me all columns of the keys ? # Ask the user to select a location to save the Excel fileĮxcel_file_path = filedialog.asksaveasfilename(title='Save as Excel',defaultextension='.xlsx')ĭf.to_excel(excel_file_path, index=False) ![]() ![]() # Load the JSON file into a pandas dataframeĭf = pd.DataFrame(data) #=> this giving me output of excel column only of result array. json_file_path = filedialog.askopenfilename(title='Select a JSON file', filetypes=) I tried with panda library with I guess it required specific key which I don't want. ![]() This is just one of a json file and I don't know what will be the structure of other json inputs. I tried to convert json file into excel but somehow panda is not able to do it for all the keys. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |