Guest User

Untitled

a guest
Jan 23rd, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. "yearBorn":1919,"yearDied":1987}
  2.  
  3. data = data.to_json(orient='records')
  4.  
  5. "yearBorn":1919.0,"yearDied":1987.0}
  6.  
  7. import requests
  8. import xlrd
  9. import json
  10. import csv
  11. import pandas as pd
  12. from pandas.io.json import json_normalize
  13.  
  14. apicounter = 1
  15. xls = pd.ExcelFile('data.xlsx')
  16. local_materials = xls.parse(xls.sheet_names[0])
  17. local_materials = pd.DataFrame(local_materials)
  18. row_count = local_materials.shape[0]
  19. data = local_materials.loc[local_materials['id'] == apicounter]
  20. data = data.to_json(orient='records')
Add Comment
Please, Sign In to add comment