Ravindra BagaleCourses & study guides

14. Visualization with seaborn

14.1 Quick Start

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

sns.set_theme(style="whitegrid")

df = pd.DataFrame({
    "city": [
        "Pune", "Pune", "Nashik", "Nagpur", "Solapur", "Kolhapur",
        "Sambhaji Nagar", "Pune", "Nashik", "Pune", "Nagpur", "Pune",
    ],
    "amount": [64, 900, 450, 240, 1299, 58, 195, 320, 880, 110, 240, 75],
    "status": [
        "Delivered", "Delivered", "Delivered", "Delivered", "Delivered", "Cancelled",
        "Delivered", "Delivered", "Delivered", "Returned", "Delivered", "Delivered",
    ],
    "festival": [
        "None", "Diwali", "Diwali", "None", "None", "None",
        "Diwali", "Ganeshotsav", "Diwali", "None", "None", "None",
    ],
})