I have a text file with a punch of keywords:
baseball,player,bat,creek,home,guy,squatting,plane
, something like this and I want a code to change them to be like this:
'baseball','player','bat','creek','home','guy','squatting','plane'
.
Code:
import pandas as pd
import csv
file = pd.read_csv('/home/greshad/code/data_vis/error_score-updated.csv')
out = open('/home/greshad/code/data_vis/keywords.txt', 'w')
for i in range(len(file)):
out.writelines(file['words'][i] + ',')