I want to tokenize data from CSV file. I'm using this code and I'm unable to tokenize the entire column. I am only able to tokenize the first row in the column. The column is known as 'tweet'.
import pandas as pd
import nltk
from nltk import word_tokenize
data=pd.read_csv('/Users/yoshithKotla/Desktop/dingdang/nov19Tweets.csv')
Texts=list(data['tweet'].values)
tokenData = [nltk.word_tokenize(tweet) for tweet in Texts]
print(tokenData)
Try this code and see what u get:
To save the output as csv file you can use
csv.writer
: