Analyzing data
Contents
42.27. Analyzing data#
Examples of the Pandas functions mentioned in the section.
import pandas as pd
import glob
# Loading the dataset
path = "https://static-1300131294.cos.ap-shanghai.myqcloud.com/data/data-science/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'))
42.27.1. Acknowledgments#
Thanks to Microsoft for creating the open source course Data Science for Beginners. It inspires the majority of the content in this chapter.