📊 Dataset · CSV
titanic.csv dataset
Download titanic.csv free (891 rows × 12 columns, 58.9 KB). Preview the rows and columns, load it in pandas in one line and practise with 7 Python lessons.
- Size58.9 KB
- Rows891
- Columns12
- Used in7 lessons
Preview (first rows)
| PassengerId | Survived | Pclass | Name | Sex | Age | SibSp | Parch | Ticket | Fare | Cabin | Embarked |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 3 | Braund, Mr. Owen Harris | male | 22.0 | 1 | 0 | A/5 21171 | 7.25 | S | |
| 2 | 1 | 1 | Cumings, Mrs. John Bradley (Florence Bri | female | 38.0 | 1 | 0 | PC 17599 | 71.2833 | C85 | C |
| 3 | 1 | 3 | Heikkinen, Miss. Laina | female | 26.0 | 0 | 0 | STON/O2. 3101282 | 7.925 | S | |
| 4 | 1 | 1 | Futrelle, Mrs. Jacques Heath (Lily May P | female | 35.0 | 1 | 0 | 113803 | 53.1 | C123 | S |
| 5 | 0 | 3 | Allen, Mr. William Henry | male | 35.0 | 0 | 0 | 373450 | 8.05 | S | |
| 6 | 0 | 3 | Moran, Mr. James | male | 0 | 0 | 330877 | 8.4583 | Q | ||
| 7 | 0 | 1 | McCarthy, Mr. Timothy J | male | 54.0 | 0 | 0 | 17463 | 51.8625 | E46 | S |
| 8 | 0 | 3 | Palsson, Master. Gosta Leonard | male | 2.0 | 3 | 1 | 349909 | 21.075 | S |
Columns
| Column | Type | Missing | Example |
|---|---|---|---|
PassengerId | integer | 0 | 1 |
Survived | integer | 0 | 0 |
Pclass | integer | 0 | 3 |
Name | text | 0 | Braund, Mr. Owen Harris |
Sex | text | 0 | male |
Age | decimal | 177 | 22.0 |
SibSp | integer | 0 | 1 |
Parch | integer | 0 | 0 |
Ticket | text | 0 | A/5 21171 |
Fare | decimal | 0 | 7.25 |
Cabin | text | 687 | C85 |
Embarked | text | 2 | S |
Load it in Python
import pandas as pd
df = pd.read_csv("titanic.csv")
df.head()






