I am a newbie and I have a csv file that contains account name of reddit, subreddit, time and message.
I read it with:
train_data = pd.read_csv("addres/train_data.csv", encoding="utf8")
if I write:
train_data.head()
I see
Do you know a way in which I can create an array with [author, body] ?
To begin I have tried to create two array (author and messages) in this way:
train=open("addres/train_data.csv")
train.readline()
author=[]
message=[]
for line in train:
autore,categoria,ora, messaggio=line.split(",")
author.append(autore)
message.append(messaggio)
But messages contains "," so it doesn't work properly.
Thank you and sorry for the silly question.