import pandas as pd
def process(input_path, output_path):
for i, df in enumerate(pd.read_csv(input_path, chunksize=100000)):
df = _process(df)
mode = "a" if i != 0 else "w"
header = True if i == 0 else None
df.to_csv(output_path, index=None, mode=mode, header=header)
网友评论