I am pretty new to python. I am trying to import the SMSSpam Collection Data using pandas read_csv module. I The import went went. But as the file does not have header I tried to include columns names(variables names : "status" and "message" and ended up with empty file. Here is my code:
import numpy as np
import pandas as pd
file_loc="C:\Users\User\Documents\JP\SMSCollection.txt"
df=pd.read_csv(file_loc,sep='\t')
The above code works well I got the I got the 5571 rows x 2 columns]. But when I add columns using the following line of code
df.columns=["status","message"]
I ended up with an empty df Any help on this ? Thanks