antonbol commited on
Commit
ab3b679
1 Parent(s): 5a45d93

removed binning for now

Browse files
Files changed (1) hide show
  1. feature_engineering.py +5 -5
feature_engineering.py CHANGED
@@ -75,14 +75,14 @@ def feat_eng(df):
75
  # Cast age to int
76
  df["Age"] = df["Age"].astype("int")
77
  # Bin ages
78
- df['Age'] = pd.cut(df['Age'],[0,8,15,30,65,150])
79
 
80
- # Bin fare
81
- df['Fare'] = pd.cut(df['Fare'],[0,200,400,600,1000])
82
 
83
 
84
- # Bin SibSp
85
- pd.cut(df['SibSp'], [0,1,2,7], right=False)
86
 
87
  # Cabin into categories based on first letter(deck of boat)
88
  df["Cabin"] = df["Cabin"].str.slice(0,1)
 
75
  # Cast age to int
76
  df["Age"] = df["Age"].astype("int")
77
  # Bin ages
78
+ # df['Age'] = pd.cut(df['Age'],[0,8,15,30,65,150])
79
 
80
+ # # Bin fare
81
+ # df['Fare'] = pd.cut(df['Fare'],[0,200,400,600,1000])
82
 
83
 
84
+ # # Bin SibSp
85
+ # pd.cut(df['SibSp'], [0,1,2,7], right=False)
86
 
87
  # Cabin into categories based on first letter(deck of boat)
88
  df["Cabin"] = df["Cabin"].str.slice(0,1)