0
我使用urlopen獲取數據的字符串作爲follows.I希望將字符串轉換爲數據幀和儲備幾列,樣態,AQI等。我不知道該怎麼做,並想向你尋求建議。謝謝!如何將字符串轉換成數據幀在Python
response=urlopen(URL).read().decode('utf-8')
print(response)
"DateIssue","DateForecast","ReportingArea","StateCode","Latitude","Longitude","ParameterName","AQI","CategoryNumber","CategoryName","ActionDay","Discussion"
"2017-05-01 ","2017-05-01 ","Metropolitan Washington","DC","38.919","-77.013","O3","42","1","Good","false",""
"2017-05-01 ","2017-05-01 ","Metropolitan Washington","DC","38.919","-77.013","PM2.5","46","1","Good","false",""
"2017-05-01 ","2017-05-02 ","Metropolitan Washington","DC","38.919","-77.013","O3","44","1","Good","false",""
"2017-05-01 ","2017-05-02 ","Metropolitan Washington","DC","38.919","-77.013","PM2.5","25","1","Good","false",""
"2017-05-01 ","2017-05-03 ","Metropolitan Washington","DC","38.919","-77.013","O3","44","1","Good","false",""
"2017-05-01 ","2017-05-03 ","Metropolitan Washington","DC","38.919","-77.013","PM2.5","25","1","Good","false",""
"2017-05-01 ","2017-05-04 ","Metropolitan Washington","DC","38.919","-77.013","O3","42","1","Good","false",""
"2017-05-01 ","2017-05-04 ","Metropolitan Washington","DC","38.919","-77.013","PM2.5","29","1","Good","false",""