Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Using .loc[ ] | Identifying Spam Emails
Identifying Spam Emails

book
Using .loc[ ]

Tarefa

Swipe to start coding

  1. Create a variable X to store the values of the 'text' column.
  2. 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?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 7
AVAILABLE TO ULTIMATE ONLY
some-alt