title: When to use fit_transform and transform?
body: <p>For stuff like <code>LabelEncoder</code> and the <code>SimpleImputer</code> from scikit-learn why do we use <code>fit_transform</code> for the <code>X_train</code> DataFrame and why do we use <code>transform</code> for the <code>X_valid</code> DataFrame?</p>
  <p>eg</p>
  <pre><code>for col in object_cols:
      label_X_train[col] = label_encoder.fit_transform(X_train[col])
      label_X_valid[col] = label_encoder.transform(X_valid[col])
  </code></pre>
  <p>What is the difference between the two in terms of how they work?</p>