How to do this stuff in python pandas? I am trying to make put request to some API and not sure how to generate request body since I have the csv file only . Request body asks for fixed set of schema
Advertisement
Answer
Dataframe has a function to_dict
.
JavaScript
x
3
1
documents = df.to_dict(orient='records')
2
result = {'items': documents}
3