I am having the issue in converting the row-wise data of dataframe with the column name as key and row data as value. I want to pass this row-wise json to another API a
Try this:
import requests import pandas as pd def call_api(json_data): r = requests.post(url, headers=headers, data=out) print(r.json()) df.apply(lambda x:call_api(x.to_json()),axis=1)
Hope this helps!