Oct-24-2019, 03:46 AM
Do you want to group your data by values in a certain column and write the
content of each group to a file. If so, your code might be like this one:
content of each group to a file. If so, your code might be like this one:
import pandas as pd data = pd.read_csv('your big file.csv') for gr, d in data.groupby(data.iloc[:, 9]): d.to_csv('output_%s.csv' % gr)