daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top