我试图将API的返回从text(string)转换为dataframe,但不幸的是我不能,有没有办法做到这一点。
从API返回的文本带有标题。
import requests
url = "test"
headers = {
"accept": "text/csv",
"authorization": "Bearer test"
}
response = requests.get(url, headers=headers, timeout=60)
print(response.text)
API输出Device Type,OS Version,App Version,SDK Version,App ID,App Name,Bundle ID,Is Retargeting,Retargeting Conversion Type,Attribution Lookback,Reengagement Window,Is Primary Attribution,User Agent,HTTP Referrer,Original URL ,,2021-01-13 15:53:23,2023-01-01 01:32:37,uninstall,,,,,SDK,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,SA,BR,PE
1条答案
按热度按时间wh6knrhe1#
我想你在找这个