{
  "id": 212277,
  "title": "Undersampling .csv dataframe",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/212277",
  "author_name": "Sarang Bhatnagar",
  "post_date": "2021-01-18T10:35:37.763000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Can someone please tell me how can I undersample the third class?<br>\nI simply want to randomly reduce 1000 rows of 3rd class in df.csv file.<br>\nI tried using pd.sample but did not succeed can someone provide the code to me?<br>\nI dont want to touch the other classes and keep them as they are</p>",
  "messages": [
    {
      "id": 1158026,
      "postDate": "2021-01-18T10:35:37.763Z",
      "content": "<p>Can someone please tell me how can I undersample the third class?<br>\nI simply want to randomly reduce 1000 rows of 3rd class in df.csv file.<br>\nI tried using pd.sample but did not succeed can someone provide the code to me?<br>\nI dont want to touch the other classes and keep them as they are</p>",
      "rawMarkdown": "Can someone please tell me how can I undersample the third class?\nI simply want to randomly reduce 1000 rows of 3rd class in df.csv file.\nI tried using pd.sample but did not succeed can someone provide the code to me?\nI dont want to touch the other classes and keep them as they are\n",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1158026": "Can someone please tell me how can I undersample the third class?\nI simply want to randomly reduce 1000 rows of 3rd class in df.csv file.\nI tried using pd.sample but did not succeed can someone provide the code to me?\nI dont want to touch the other classes and keep them as they are\n"
  }
}