title: Running get_dummies on train and test data returns different amount of columns - is it ok to concat the two sets and split after feature engineering?
body: <p>My train and test data set that are two seperate csv files.</p>
  
  <p>I've done some feature engineering on the test set and have used pd_get_dummies() which works as expected.</p>
  
  <p>Training Classes</p>
  
  <pre><code>|Condition|
  -----------
  Poor
  Ok
  Good
  Excelent
  </code></pre>
  
  <p>My issue is that the there is a mismatch when I try to predict the values as the test set has a different amount of columns after pd.get_dummies()</p>
  
  <p>Test set:</p>
  
  <pre><code>|Condition|
  -----------
  Poor
  Ok
  Good
  </code></pre>
  
  <p>Notice that Excelent is missing!! And over all the columns after creating dummies i'm about 20 columns short of the training dataframe.</p>
  
  <p>My question is it acceptable to join the train.csv and test.csv - run all my feature engineering, scaling etc and then split back into the two dataframes before the training phase?</p>
  
  <p>Or is there another better solution?</p>