有些文件太大了,不适合用Sublime打开。不是电脑卡死就是需要等很久,所以写个文件检查一部分数据。
import pandas as pd
path = r'E:\data_01s.csv'
bc = pd.read_csv(path,index_col=0,header=0,parse_dates=[0])
bc_start = bc.head(100)
bc_end = bc.tail(100)
bc_start.to_csv(r'E:\data_01s_start.csv')
bc_end.to_csv(r'E:\data_01s_end.csv')
bc['loct'] = bc.index
bc['loct'].to_csv(r'E:\data_01s_index.csv',index = False)
网友评论