摘要:
1 #读csv,excel,json数据 2 with open('E:\\test\\xdd.csv','r') as f: 3 for line in f.readlines(): 4 print(line) 5 6 7 import pandas 8 df = pandas.read_csv('E:\\test\\xdd.csv') 9... 阅读全文
摘要:
1 # 写方法1 2 f = open('tmp.txt','w') 3 f.write('hello world') 4 f.close() 5 6 # 写方法2 7 with open('tmp.txt','w') as f: 8 f.write('hello \n word') 9 10 # 读 11 with open('tmp.txt', 'r'... 阅读全文