我正在尝试使用内置的 python csv 阅读器解析 csv 文件,如下所示:
sms_prices_list_url = "http://www.twilio.com/resources/rates/international-sms-rates.csv"
sms_prices_list = requests.get(sms_prices_list_url)
reader = csv.reader(sms_prices_list.text)
for row in reader:
print row
但是,当我这样做时,几乎所有内容都是按字符打印的,而不是按字典项或列项打印,例如:
['C']
['o']
['u']
['n']
['t']
['r']
['y']
['', '']
[' ']
['N']
['a']
['m']
['e']
['', '']
[' ']
['R']
['a']
['t']
['e']
[]
['', '']
['UNITED STATES Inbound SMS - Other']
['', '']
['0']
如何将这些条目分成字典列表?