Using .loc[ ]
Tarefa
Swipe to start coding
- Create a variable
X
to store the values of the'text'
column. - Create a variable
y
to store the values of the'class'
column.
Solução
# Store the 'text' column
X = df.loc[:, 'text']
# Store the 'class' column
y = df.loc[:, 'class']
print(f"Shape of X: {X.shape}\nshape of y: {y.shape}")
Mark tasks as Completed
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 7
AVAILABLE TO ULTIMATE ONLY