{
  "id": 502606,
  "title": "Convert Category to String ",
  "url": "/competitions/home-credit-credit-risk-model-stability/discussion/502606",
  "author_name": "Anil Kumar Reddy",
  "post_date": "2024-05-14T04:42:49.151000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>While coverting date_decision, date columns that pandas is considering as category , how do we conver category to datetime use below method:</p>\n<h1>Convert category to string and then to datetime</h1>\n<p>df['dates_str'] = df['dates'].astype(str)<br>\ndf['dates_datetime'] = pd.to_datetime(df['dates_str'])</p>",
  "messages": [
    {
      "id": 2812038,
      "postDate": "2024-05-14T04:42:49.153Z",
      "content": "<p>While coverting date_decision, date columns that pandas is considering as category , how do we conver category to datetime use below method:</p>\n<h1>Convert category to string and then to datetime</h1>\n<p>df['dates_str'] = df['dates'].astype(str)<br>\ndf['dates_datetime'] = pd.to_datetime(df['dates_str'])</p>",
      "rawMarkdown": "While coverting date_decision, date columns that pandas is considering as category , how do we conver category to datetime use below method:\n\n# Convert category to string and then to datetime\ndf['dates_str'] = df['dates'].astype(str)\ndf['dates_datetime'] = pd.to_datetime(df['dates_str'])"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2812038": "While coverting date_decision, date columns that pandas is considering as category , how do we conver category to datetime use below method:\n\n# Convert category to string and then to datetime\ndf['dates_str'] = df['dates'].astype(str)\ndf['dates_datetime'] = pd.to_datetime(df['dates_str'])"
  }
}