Skip to content

Commit

Permalink
Create exceltojson
Browse files Browse the repository at this point in the history
  • Loading branch information
eapframework authored Mar 2, 2020
1 parent bf688f7 commit 4c0bf17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions optimus/exceltojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
df_pandas_grped = pdf.groupby('Input_file')
final_dict = {}
for key, grp in df_pandas_grped:
final_dict[str(key)] = grp.to_dict('records')

with open("/dbfs/FileStore/tables/jsaonoutput.json",'w')as f:
f.write(json.dumps(final_dict,indent=4))

0 comments on commit 4c0bf17

Please sign in to comment.