'} << the valid json object format that the api acceptsdata = json.dumps(data)response = requests.post(api_url, headers = auth_head, data = json_obj)
print(response.text
我将一个URL值传递给API,并将结果写入CSV。我还想从输入文件中读取id并将其添加到CSV中。我应该编写一个独占的函数来获得这个,还是在python中有其他方法来满足这些需求?因为我只将URL传递给我的代码,所以我只能将它添加到我的最终输出中。如何改进这个解决方案?,row in df.iterrows():
api='api.com/{row}' //passing the url (row) to <e