<jupyter_start><jupyter_text>Text to csv<jupyter_code>file = open('./../Naive_Bayes/tweets/p_n_n_tweets.lv.txt','r',encoding='utf8')
Lines = file.readlines()
 
count = 0
# Strips the newline character
for line in Lines:
    count += 1
    
count
df['message_lv_tilde']=pd.Series(dtype='float64')
df.head()
i = 0
for line in Lines:
    df['message_lv_tilde'][i] = line
    i += 1
    
df.head()
df.iloc[174643]['message_lv_tilde']
df.to_csv('./../Naive_Bayes/tweets/df_tilde_lv.csv', index=False)<jupyter_output><empty_output>