I want to write a .csv file. One of the columns is "words". Each category of words is in a row, and the cell "words" has a list of words that I read as:
words = []
for i in range(len(category)):
r = requests.post(base_url+'/'+url[i])
if r.ok:
data = r.content.decode('utf8')
words.append(pd.Series.tolist((pd.read_csv(io.StringIO(data), squeeze=True)).T))
url_f = [base_url + s for s in url]
df = pd.DataFrame({'category': category, 'url': url_f,
'words': words})
df.to_csv("lm_words.csv")
the list of words is downloaded as r.
The table looks something like this:
index | category | url | words
0. | cat1. | www.| [word1, word2, word3]
And I am trying to get rid of the brackets in [ word1, word2, word3 ].
I have this written in R and it doesn't print the brackets in the .csv
Edit1: Format