上QQ阅读APP看书,第一时间看更新
Separating features from labels
Let's separate our features from the labels, as we will feed them into the model separately:
In []: features = df.loc[:,:'fluffy'] labels = df.label
This horrible construction df.loc[:,:'fluffy'] tells the data frame that we want all the rows (the first column), and the columns starting from the first, finishing with 'fluffy'.