Python Pandas Exercises for Data Analysis

May 12, 2021

import pandas as pd

import seaborn as sns

import numpy as np

import matplotlib.pyplot as plt

# load dataset

df = sns.load_dataset('titanic')

Exercise 1: From the given dataset print the first and last five rows.

Exercise 2: Clean the dataset and update the CSV file.

Exercise 3: Find the highest fare.

Exercise 4: Print all survivors details.

Exercise 5: Count total passengers per class.

Exercise 6: Find each class highest fare.

Exercise 7: Find the average age of passengers by class.

Exercise 8: Sort all passengers by fare and age columns.


Resources others found helpful

ISEB English Paper

Practice ISEB exam from 2012 with marks scheme

Biology Online Skeleton

This awesome online skeleton is perfect for revising the bones of the human body