{
  "id": 130607,
  "title": "Error in MPlayers.csv @ line 80",
  "url": "/competitions/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/discussion/130607",
  "author_name": "",
  "post_date": "2020-02-15T07:36:59.259914100Z",
  "votes": 8,
  "comment_count": 3,
  "views": 0,
  "content": "<p>In MPlayers.csv, there are 4 columns, but at line number 80, there are 5 values. So <code>pd.read_csv()</code> gives following error: </p>\n\n<p><code>ParserError: Error tokenizing data. C error: Expected 4 fields in line 80, saw 5</code></p>\n\n<p>Here's the actual data:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1905996%2F6ab80df99cdb5b4f256e616042363e02%2FScreenshot%202020-02-15%20at%201.10.34%20PM.png?generation=1581752469694930&amp;alt=media\" alt=\"\"></p>\n\n<p>To ignore such erroneous lines while reading, use <code>error_bad_lines=False</code> in <code>pd.read_csv()</code> as following:</p>\n\n<p><code>pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MPlayers.csv', error_bad_lines=False)</code></p>\n\n<p>Thanks!</p>",
  "messages": [
    {
      "id": "746559",
      "postDate": "02/15/2020 07:36:59",
      "content": "<p>In MPlayers.csv, there are 4 columns, but at line number 80, there are 5 values. So <code>pd.read_csv()</code> gives following error: </p>\n\n<p><code>ParserError: Error tokenizing data. C error: Expected 4 fields in line 80, saw 5</code></p>\n\n<p>Here's the actual data:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1905996%2F6ab80df99cdb5b4f256e616042363e02%2FScreenshot%202020-02-15%20at%201.10.34%20PM.png?generation=1581752469694930&amp;alt=media\" alt=\"\"></p>\n\n<p>To ignore such erroneous lines while reading, use <code>error_bad_lines=False</code> in <code>pd.read_csv()</code> as following:</p>\n\n<p><code>pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MPlayers.csv', error_bad_lines=False)</code></p>\n\n<p>Thanks!</p>",
      "rawMarkdown": "In MPlayers.csv, there are 4 columns, but at line number 80, there are 5 values. So `pd.read_csv()` gives following error: \n\n`ParserError: Error tokenizing data. C error: Expected 4 fields in line 80, saw 5`\n\nHere's the actual data:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1905996%2F6ab80df99cdb5b4f256e616042363e02%2FScreenshot%202020-02-15%20at%201.10.34%20PM.png?generation=1581752469694930&amp;alt=media)\n\n\nTo ignore such erroneous lines while reading, use `error_bad_lines=False` in `pd.read_csv()` as following:\n\n`pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MPlayers.csv', error_bad_lines=False)`\n\nThanks!",
      "votes": null
    },
    {
      "id": "746929",
      "postDate": "02/15/2020 18:45:31",
      "content": "<p>Ironically, there are no errors like this in the women's WPlayers file, because there aren't any women players with a suffix like \"Jr\" or \"III\" in their name that gets a comma in it.  I thought that values with commas would be enclosed with quotes but it looks like I was wrong.  I will figure out how file corrections work and update the file.  Fortunately it is a relatively unimportant file since it just provides text labels to the player ID's.</p>",
      "rawMarkdown": "Ironically, there are no errors like this in the women's WPlayers file, because there aren't any women players with a suffix like \"Jr\" or \"III\" in their name that gets a comma in it.  I thought that values with commas would be enclosed with quotes but it looks like I was wrong.  I will figure out how file corrections work and update the file.  Fortunately it is a relatively unimportant file since it just provides text labels to the player ID's.",
      "votes": null
    },
    {
      "id": "747058",
      "postDate": "02/15/2020 22:36:07",
      "content": "<p>I wrote a small script to remove the unwanted commas. Maybe, it can be useful to someone. To run it, launch :\n<code>python clean_player.py MPlayers.csv MPlayers_correction.csv</code>.\nThen, you should be able to read the file without issues.</p>",
      "rawMarkdown": "I wrote a small script to remove the unwanted commas. Maybe, it can be useful to someone. To run it, launch :\n`python clean_player.py MPlayers.csv MPlayers_correction.csv`.\nThen, you should be able to read the file without issues.",
      "votes": null
    },
    {
      "id": "747121",
      "postDate": "02/16/2020 01:21:29",
      "content": "<p>Updated the file! Thanks for letting us know.</p>",
      "rawMarkdown": "Updated the file! Thanks for letting us know.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 746929,
      "author_name": "jeffsonas",
      "author_url": "",
      "post_date": "02/15/2020 18:45:31",
      "content": "<p>Ironically, there are no errors like this in the women's WPlayers file, because there aren't any women players with a suffix like \"Jr\" or \"III\" in their name that gets a comma in it.  I thought that values with commas would be enclosed with quotes but it looks like I was wrong.  I will figure out how file corrections work and update the file.  Fortunately it is a relatively unimportant file since it just provides text labels to the player ID's.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 747058,
      "author_name": "stevengolo",
      "author_url": "",
      "post_date": "02/15/2020 22:36:07",
      "content": "<p>I wrote a small script to remove the unwanted commas. Maybe, it can be useful to someone. To run it, launch :\n<code>python clean_player.py MPlayers.csv MPlayers_correction.csv</code>.\nThen, you should be able to read the file without issues.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 747121,
      "author_name": "addisonhoward",
      "author_url": "",
      "post_date": "02/16/2020 01:21:29",
      "content": "<p>Updated the file! Thanks for letting us know.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "746559": "In MPlayers.csv, there are 4 columns, but at line number 80, there are 5 values. So `pd.read_csv()` gives following error: \n\n`ParserError: Error tokenizing data. C error: Expected 4 fields in line 80, saw 5`\n\nHere's the actual data:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1905996%2F6ab80df99cdb5b4f256e616042363e02%2FScreenshot%202020-02-15%20at%201.10.34%20PM.png?generation=1581752469694930&amp;alt=media)\n\n\nTo ignore such erroneous lines while reading, use `error_bad_lines=False` in `pd.read_csv()` as following:\n\n`pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MPlayers.csv', error_bad_lines=False)`\n\nThanks!",
    "746929": "Ironically, there are no errors like this in the women's WPlayers file, because there aren't any women players with a suffix like \"Jr\" or \"III\" in their name that gets a comma in it.  I thought that values with commas would be enclosed with quotes but it looks like I was wrong.  I will figure out how file corrections work and update the file.  Fortunately it is a relatively unimportant file since it just provides text labels to the player ID's.",
    "747058": "I wrote a small script to remove the unwanted commas. Maybe, it can be useful to someone. To run it, launch :\n`python clean_player.py MPlayers.csv MPlayers_correction.csv`.\nThen, you should be able to read the file without issues.",
    "747121": "Updated the file! Thanks for letting us know."
  },
  "source": "meta"
}