DataBrighten

    Datasets for Python and pandas practice

    14 datasetsthat fit Python ยท 2 exercises with answers

    CSV and JSON files that load with one line of pandas, with real data from USGS, the Census Bureau and the World Bank. Updated 3 November 2026.

    textnumberdateyes/no

    Start here

    Every file loads with pd.read_csv or pd.read_json. The real datasets (weather, earthquakes, population, GDP) are good for groupby, time series and plotting; the messy customer list is for cleaning.

    pd.read_csv("file.csv") or pd.read_json("file.json"). JSON files are arrays of objects with real numbers, true/false and null.

    Datasets for Python

    DatasetWhat it isMax rows
    Sample sales dataSuperstore-style retail orders with sales, cost, discount and profit.10,000
    Sample employee dataAn HR table: departments, titles, hire dates, salaries and managers.10,000
    Sample customer dataA customer list with segments, order counts, lifetime spend and activity.10,000
    Sample SQL databaseFour related tables (customers, products, orders, order items) for JOIN practice.1,000
    Messy data for cleaning practiceA customer list with duplicates, blanks, mixed dates and text in number columns.10,000
    Sample website traffic dataDaily sessions, users, bounce rate and conversions by channel.10,000
    Sample marketing campaign dataBudget, spend, impressions, clicks, CPA and ROAS per campaign.10,000
    Sample student dataTest scores, averages, letter grades and attendance for grades 9-12.10,000
    Sample restaurant sales dataOrder lines with menu items, tickets, order type and payment.10,000
    Sample bank transaction dataOne fictional account: debits, credits, categories and a running balance.10,000
    Earthquake data (USGS)Every magnitude 2.5+ earthquake worldwide in a 30-day window, from USGS.2,013
    World population by countryWorld Bank population for 217 countries and economies, 2000-2023.5,208

    Exercises