按行数专题

海量数据按行数进行切分

import osimport codecsdef split_file(read_file,write_file): readfile = open(read_file,"r")j = 0 for line in readfile: line = line.strip()line_str = line.split('\t')if j%10000 == 0: #