2种方式,update()和items()方式 In [14]: a Out[14]: {'a': 1, 'b': 2, 'c': 3} In [15]: c = {'d': 4} In [16]: a.update(c) In [17]: a Out[17]: {'a': 1, 'b': 2, 'c': 3, 'd': 4} In [18]: a = {'a': 1} In [19]: a Out[19]: {'a': 1} In [20]: c Out[20]: {'d': 4} In [2
#coding=utf-8 import os import pandas as pd import glob def hebing(): csv_list = glob.glob('*.csv') print(u'共发现%s个CSV文件'% len(csv_list)) print(u'正在处理............') for i in csv_list: fr = open(i,'r').read() with open('haha.csv','a') as f: f.write(fr)