title: Transform a label from string to float
body: <p>I want to transform the label (that is a string) in a float number.
  I'm doing like this:</p>
  <pre><code>label = LabelEncoder()
  balanced_data['label'] = label.fit_transform(balanced_data['activity'])
  balanced_data.head()
  </code></pre>
  <p>And I obtain label in number form but still string.
  How can I fix it? Thank you
  <a href="https://i.stack.imgur.com/TWevH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TWevH.png" alt="This is the code" /></a></p>