python#读csv,excel,json数据

 #读csv,excel,json数据
with open('E:\\test\\xdd.csv','r') as f:
for line in f.readlines():
print(line) import pandas
df = pandas.read_csv('E:\\test\\xdd.csv')
print(df) import pandas
df = pandas.read_excel('E:\\test\\aa.xls')
print(df) import json
with open('E:\\test\\bb.json','r') as f:
jd = f.read()
dic = json.loads(jd)
print(dic)
for word in dic:
print(word.get("xx"),word.get("yy"))
上一篇:hdu4355 三分


下一篇:15万甚至30万以内的SUV值不值得买?