Home > Blockchain >  Transferring the the data from a file to pandas dataframe, which have no file extension
Transferring the the data from a file to pandas dataframe, which have no file extension

Time:11-27

I like to use SMS Spam Collection Data Set which can be found on enter image description here

CodePudding user response:

This should work

df= pd.read_csv("your_file.csv", sep="\t")
df.dropna(how="any", inplace=True, axis=1)
df.columns = ['label', 'message']
df.head()
  • Related