{
  "id": 495066,
  "title": "How To Align The Number Of Columns For Train, Valid, And Test Data When Using 'get_dummies' ?",
  "url": "/competitions/home-credit-credit-risk-model-stability/discussion/495066",
  "author_name": "waticson",
  "post_date": "2024-04-19T14:32:40.494000",
  "votes": 17,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Sharing preprocessing tips🔥<br>\nThere are some categorical values and it doesn't work well by just using <code>pd.get_dummies</code> to Train, Valid and Test data because each dataframe has unique values in the same columns.<br>\nI show how to align the number of columns in each dataframe!!<br>\n<a href=\"https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control\" target=\"_blank\">https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control</a></p>",
  "messages": [
    {
      "id": 2760858,
      "postDate": "2024-04-19T14:32:40.493Z",
      "content": "<p>Sharing preprocessing tips🔥<br>\nThere are some categorical values and it doesn't work well by just using <code>pd.get_dummies</code> to Train, Valid and Test data because each dataframe has unique values in the same columns.<br>\nI show how to align the number of columns in each dataframe!!<br>\n<a href=\"https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control\" target=\"_blank\">https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control</a></p>",
      "rawMarkdown": "Sharing preprocessing tips🔥\nThere are some categorical values and it doesn't work well by just using `pd.get_dummies` to Train, Valid and Test data because each dataframe has unique values in the same columns.\nI show how to align the number of columns in each dataframe!!\n[https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control](https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control)",
      "votes": 17
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2760858": "Sharing preprocessing tips🔥\nThere are some categorical values and it doesn't work well by just using `pd.get_dummies` to Train, Valid and Test data because each dataframe has unique values in the same columns.\nI show how to align the number of columns in each dataframe!!\n[https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control](https://www.kaggle.com/code/yutodennou/preprocessing-categorical-data-control)"
  }
}