Open In Colab

Python CodeΒΆ

This is a Jupyter Notebook with a Python kernel.

# let's grab the titanic data from online
import pandas as pd

titanic = pd.read_csv('https://raw.githubusercontent.com/shawnrhoads/executable-book-template/main/docs/data/titanic.csv')
display(titanic.iloc[:,1:5].head())
survived pclass sex age
0 0 3 male 22.0
1 1 1 female 38.0
2 1 3 female 26.0
3 1 1 female 35.0
4 0 3 male 35.0
x = [1,2,3,4,6,7,8,9]
print(x)
[1, 2, 3, 4, 6, 7, 8, 9]