Loading the CSV file

We will load the CSV file. Refer to the following code block:

dfs = pd.read_csv('mailbox.csv', names=['subject', 'from', 'date', 'to', 'label', 'thread'])

The preceding code will generate a pandas dataframe with only the required fields stored in the CSV file.