repl.it
@adriculous/

Titanic Survival Dataset

Python

Who were likely to survive?

fork
loading
Files
  • main.py
  • titanic.csv
  • titanic.png
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
import csv
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd

dataframe = pd.read_csv("titanic.csv", delimiter=",")
dataframe = dataframe.replace({"Survived": {0: "Did not survive", 1: "Survived"}})
sns.scatterplot(x="Age", y="Fare", hue="Survived", data=dataframe)
plt.xlabel("Passenger Age")
plt.ylabel("Passenger Fare")
plt.savefig("titanic.png")
Fetching token
?