!ls /datasets/titanic
test.csv train.csv
import os
import pandas as pd
data_path = '/datasets/titanic'
train_path = os.path.join(data_path, "train.csv")
test_path = os.path.join(data_path, "test.csv")
train = pd.read_csv(train_path)
test = pd.read_csv(test_path) # 절대 들여다 보지 마세요!
x_train, x_label = train.drop("Survived", axis=1), train["Survived"]
x_train # DeepNote 기본 기능이 좋긴 좋네요!
print(x_label) # DataSeries
0 0
1 1
2 1
3 1
4 0
..
886 0
887 1
888 0
889 1
890 0
Name: Survived, Length: 891, dtype: int64