P E N C I L
Login
file - pandas

rawData = open("SMSSpamCollection.tsv").read()

rawData.replace('\t', '\n').split('\n')

import pandas as pd

fullCorpus = pd.DataFrame({

'label': labelList,

'body_list': textList

})

fullCorpus.head()

dataset = pd.read_csv("SMSSpamCollection.tsv", sep="\t", header=None)

data.columns = ['label', 'body_text']

data['body_len'] = data['body_text'].apply(lambda x: len(x) - x.count(" "))

https://subscription.packtpub.com/book/data/9781784393878/1/ch01lvl1sec17/working-with-operators-on-a-series

Series * 1, >=3 => create a new series. It's numpy operator