#coding=utf-8
import glob
from astropy.table import vstack, Table
def hebing():
csv_list = glob.glob('*.csv')
print(csv_list)
print(u'共发现%s个CSV文件'% len(csv_list))
print(u'正在处理............')
ls_tb = []
for i in csv_list:
tb = Table.read(i)
ls_tb.append(tb)
# 合并表格,并一次性写入csv文件
t = vstack(ls_tb)
t.write('panstar.csv',overwrite = True)
if __name__ == '__main__':
hebing()
08-18
1708