Analyzing DataΒΆ

Examples of the Pandas functions mentioned in the lesson.

import pandas as pd
import glob

#Loading the dataset
path = '../../data/emails.csv'
email_df = pd.read_csv(path)
# Using Describe on the email dataset
print(email_df.describe())
# Sampling 10 emails
print(email_df.sample(10))
# Returns rows where there are more occurrences of "to" than "the"
print(email_df.query('the < to'))