{
  "id": 248667,
  "title": "Question about N/A value for isTie",
  "url": "/competitions/mlb-player-digital-engagement-forecasting/discussion/248667",
  "author_name": "",
  "post_date": "2021-06-24T12:45:45.652556600Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi!</p>\n<p>I wonder why there is no value for the isTie field for some observations. What does that mean? Is this a bug or something else? Thanks for the help.</p>",
  "messages": [
    {
      "id": "1363879",
      "postDate": "06/24/2021 12:45:45",
      "content": "<p>Hi!</p>\n<p>I wonder why there is no value for the isTie field for some observations. What does that mean? Is this a bug or something else? Thanks for the help.</p>",
      "rawMarkdown": "Hi!\n\nI wonder why there is no value for the isTie field for some observations. What does that mean? Is this a bug or something else? Thanks for the help.",
      "votes": null
    },
    {
      "id": "1364601",
      "postDate": "06/25/2021 05:18:37",
      "content": "<p>I found partial reason.</p>\n<p>Here, <code>games</code> is a pandas.DataFrame object which can be obtained by unpacking <code>games</code> column of train.csv.</p>\n<pre><code># Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n</code></pre>\n<p>It shows following result.</p>\n<table>\n<thead>\n<tr>\n<th>codedGameState</th>\n<th>detailedGameState</th>\n<th>gamePk</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>C</td>\n<td>Cancelled</td>\n<td>20</td>\n</tr>\n<tr>\n<td>D</td>\n<td>Postponed</td>\n<td>174</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Completed Early</td>\n<td>1</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Final</td>\n<td>156</td>\n</tr>\n<tr>\n<td>S</td>\n<td>Scheduled</td>\n<td>14</td>\n</tr>\n<tr>\n<td>U</td>\n<td>Suspended</td>\n<td>1</td>\n</tr>\n</tbody>\n</table>\n<pre><code># Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n</code></pre>\n<p>It shows following result.</p>\n<table>\n<thead>\n<tr>\n<th>codedGameState</th>\n<th>detailedGameState</th>\n<th>gamePk</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>F</td>\n<td>Completed Early</td>\n<td>34</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Final</td>\n<td>7459</td>\n</tr>\n<tr>\n<td>O</td>\n<td>Game Over</td>\n<td>1</td>\n</tr>\n</tbody>\n</table>\n<p>Therefore \"Cancelled\", \"Postponed\", \"Scheduled\" and \"Suspended\" statuses probably indicates that the game's result is not active. There are, however, still remains the mystery of \"Completed Early\" and \"Final\" statuses which appears with both missing <code>isTie</code> and NOT missing one. Competition's data description <a href=\"https://statsapi.mlb.com/api/v1/gameStatus\" target=\"_blank\">here</a> gives us detail description about status. There are some fields (i.e. \"StatusCode\") which are not contained in games. I assume that \"Completed Early\" and \"Final\" statuses have more detail category and some of them indicates the game's result is not active.</p>",
      "rawMarkdown": "I found partial reason.\n\nHere, `games` is a pandas.DataFrame object which can be obtained by unpacking `games` column of train.csv.\n\n```\n# Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n```\n\nIt shows following result.\n\n| codedGameState   | detailedGameState   |   gamePk |\n|:-----------------|:--------------------|---------:|\n| C                | Cancelled           |       20 |\n| D                | Postponed           |      174 |\n| F                | Completed Early     |        1 |\n| F                | Final               |      156 |\n| S                | Scheduled           |       14 |\n| U                | Suspended           |        1 |\n\n\n```\n# Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n```\n\nIt shows following result.\n\n| codedGameState   | detailedGameState   |   gamePk |\n|:-----------------|:--------------------|---------:|\n| F                | Completed Early     |       34 |\n| F                | Final               |     7459 |\n| O                | Game Over           |        1 |\n\nTherefore \"Cancelled\", \"Postponed\", \"Scheduled\" and \"Suspended\" statuses probably indicates that the game's result is not active. There are, however, still remains the mystery of \"Completed Early\" and \"Final\" statuses which appears with both missing `isTie` and NOT missing one. Competition's data description [here](https://statsapi.mlb.com/api/v1/gameStatus) gives us detail description about status. There are some fields (i.e. \"StatusCode\") which are not contained in games. I assume that \"Completed Early\" and \"Final\" statuses have more detail category and some of them indicates the game's result is not active.",
      "votes": null
    },
    {
      "id": "1364776",
      "postDate": "06/25/2021 07:39:06",
      "content": "<p>MLB games can not be \"completed\" as a Tie.</p>\n<p>However, the game can be stopped for lots of reasons and resume in the future.</p>\n<p>So if a data row has <strong>IsTie as True</strong> than other data should support that it will be resumed at a later date.  I have not verified that the data does this.  </p>",
      "rawMarkdown": "MLB games can not be \"completed\" as a Tie.\n\nHowever, the game can be stopped for lots of reasons and resume in the future.\n\nSo if a data row has **IsTie as True** than other data should support that it will be resumed at a later date.  I have not verified that the data does this.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1364601,
      "author_name": "tomokikmogura",
      "author_url": "",
      "post_date": "06/25/2021 05:18:37",
      "content": "<p>I found partial reason.</p>\n<p>Here, <code>games</code> is a pandas.DataFrame object which can be obtained by unpacking <code>games</code> column of train.csv.</p>\n<pre><code># Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n</code></pre>\n<p>It shows following result.</p>\n<table>\n<thead>\n<tr>\n<th>codedGameState</th>\n<th>detailedGameState</th>\n<th>gamePk</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>C</td>\n<td>Cancelled</td>\n<td>20</td>\n</tr>\n<tr>\n<td>D</td>\n<td>Postponed</td>\n<td>174</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Completed Early</td>\n<td>1</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Final</td>\n<td>156</td>\n</tr>\n<tr>\n<td>S</td>\n<td>Scheduled</td>\n<td>14</td>\n</tr>\n<tr>\n<td>U</td>\n<td>Suspended</td>\n<td>1</td>\n</tr>\n</tbody>\n</table>\n<pre><code># Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n</code></pre>\n<p>It shows following result.</p>\n<table>\n<thead>\n<tr>\n<th>codedGameState</th>\n<th>detailedGameState</th>\n<th>gamePk</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>F</td>\n<td>Completed Early</td>\n<td>34</td>\n</tr>\n<tr>\n<td>F</td>\n<td>Final</td>\n<td>7459</td>\n</tr>\n<tr>\n<td>O</td>\n<td>Game Over</td>\n<td>1</td>\n</tr>\n</tbody>\n</table>\n<p>Therefore \"Cancelled\", \"Postponed\", \"Scheduled\" and \"Suspended\" statuses probably indicates that the game's result is not active. There are, however, still remains the mystery of \"Completed Early\" and \"Final\" statuses which appears with both missing <code>isTie</code> and NOT missing one. Competition's data description <a href=\"https://statsapi.mlb.com/api/v1/gameStatus\" target=\"_blank\">here</a> gives us detail description about status. There are some fields (i.e. \"StatusCode\") which are not contained in games. I assume that \"Completed Early\" and \"Final\" statuses have more detail category and some of them indicates the game's result is not active.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1364776,
      "author_name": "pcjimmmy",
      "author_url": "",
      "post_date": "06/25/2021 07:39:06",
      "content": "<p>MLB games can not be \"completed\" as a Tie.</p>\n<p>However, the game can be stopped for lots of reasons and resume in the future.</p>\n<p>So if a data row has <strong>IsTie as True</strong> than other data should support that it will be resumed at a later date.  I have not verified that the data does this.  </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1363879": "Hi!\n\nI wonder why there is no value for the isTie field for some observations. What does that mean? Is this a bug or something else? Thanks for the help.",
    "1364601": "I found partial reason.\n\nHere, `games` is a pandas.DataFrame object which can be obtained by unpacking `games` column of train.csv.\n\n```\n# Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n```\n\nIt shows following result.\n\n| codedGameState   | detailedGameState   |   gamePk |\n|:-----------------|:--------------------|---------:|\n| C                | Cancelled           |       20 |\n| D                | Postponed           |      174 |\n| F                | Completed Early     |        1 |\n| F                | Final               |      156 |\n| S                | Scheduled           |       14 |\n| U                | Suspended           |        1 |\n\n\n```\n# Count `*GameState` columns with missing `isTie`\ndisplay(games[~games.isTie.isnull()] \\\n       .groupby(['codedGameState', 'detailedGameState']) \\\n       .gamePk \\\n       .count() \\\n       .sort_index())\n```\n\nIt shows following result.\n\n| codedGameState   | detailedGameState   |   gamePk |\n|:-----------------|:--------------------|---------:|\n| F                | Completed Early     |       34 |\n| F                | Final               |     7459 |\n| O                | Game Over           |        1 |\n\nTherefore \"Cancelled\", \"Postponed\", \"Scheduled\" and \"Suspended\" statuses probably indicates that the game's result is not active. There are, however, still remains the mystery of \"Completed Early\" and \"Final\" statuses which appears with both missing `isTie` and NOT missing one. Competition's data description [here](https://statsapi.mlb.com/api/v1/gameStatus) gives us detail description about status. There are some fields (i.e. \"StatusCode\") which are not contained in games. I assume that \"Completed Early\" and \"Final\" statuses have more detail category and some of them indicates the game's result is not active.",
    "1364776": "MLB games can not be \"completed\" as a Tie.\n\nHowever, the game can be stopped for lots of reasons and resume in the future.\n\nSo if a data row has **IsTie as True** than other data should support that it will be resumed at a later date.  I have not verified that the data does this."
  },
  "source": "meta"
}