Spaces:
Runtime error
Runtime error
File size: 466 Bytes
9988244 f9cfbca 9988244 da86775 2466d7f da86775 f9cfbca 2466d7f f9cfbca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import pandas as pd
def process_data(split='train'):
df = pd.read_csv('C:/Users/gbhat/Documents/GitHub/summarization/data/raw/{}.csv'.format(split))
df.columns = ['Unnamed: 0', 'input_text', 'output_text']
print(df.columns)
df.to_csv('C:/Users/gbhat/Documents/GitHub/summarization/data/processed/{}.csv'.format(split))
if __name__ == '__main__':
process_data(split='train')
process_data(split='test')
process_data(split='validation')
|