AI Datasets
Esc

    ↑↓ move↵ open/ search from any page

    Catalog / Tabular

    Titanic (2012)

    891 Titanic passengers with class, sex, age and fare. Predict who survived.

    Why it matters

    Kaggle's "getting started" competition and, for many people, their first end-to-end ML project. It has everything a real tabular problem has in miniature: missing values, categorical features, feature engineering (titles hidden in names, family size) and a strong signal you can explain.

    Get the data

    # pip install -U huggingface_hub
    hf download phihung/titanic --repo-type dataset \
      --local-dir titanic
    Year
    2012
    Creators
    Kaggle (passenger records from Encyclopedia Titanica)
    Task
    Binary classification (did the passenger survive?)
    Size
    1,309 passengers (891 labeled)
    Splits
    train 891 · test 418
    Input
    11 columns, numeric and categorical, with missing values
    Labels
    Survived (1) or not (0)
    License
    Kaggle competition data

    Samples

    Showing 8 of 16 sampled rows(from 891 in the train split)
    PassengerIdSurvivedPclassNameSexAgeSibSpParchTicketFareCabinEmbarked
    27401Natsch, Mr. Charles Hmale3701PC 1759629.7C118C
    14213Nysten, Miss. Anna Sofiafemale22003470817.75∅S
    51503Coleff, Mr. Satiomale24003492097.4958∅S
    34712Smith, Miss. Marion Elsiefemale40003141813∅S
    19112Pinsky, Mrs. (Rosa)female320023460413∅S
    47503Strandberg, Miss. Ida Sofiafemale220075539.8375∅S
    63203Lundahl, Mr. Johan Svenssonmale51003477437.0542∅S
    701McCarthy, Mr. Timothy Jmale54001746351.8625E46S

    ∅ = missing value

    What one record actually looks like (raw JSON, row 273)
    {
      "Age": 37,
      "Cabin": "C118",
      "Embarked": "C",
      "Fare": 29.7,
      "Name": "Natsch, Mr. Charles H",
      "Parch": 1,
      "PassengerId": 274,
      "Pclass": 1,
      "Sex": "male",
      "SibSp": 0,
      "Survived": 0,
      "Ticket": "PC 17596"
    }

    Media fields point at a local copy; on Hugging Face they are bytes in a Parquet file.

    Sampled 2026-11-07 from phihung/titanic at revision 9753139

    The whole dataset at once

    Worth knowing

    Related datasets