{
  "id": 74197,
  "title": "what is the time range of 'historical_transactions.csv' ?",
  "url": "/competitions/elo-merchant-category-recommendation/discussion/74197",
  "author_name": "",
  "post_date": "2018-12-10T00:49:32.952124Z",
  "votes": 2,
  "comment_count": 7,
  "views": 0,
  "content": "<p>In <strong>Data Description</strong>, historical_transactions.csv is described as:\n&gt; historical_transactions.csv contains up to 3 months' worth of\n&gt; transactions for every card at any of the provided <code>merchant_ids</code>.</p>\n\n<p>But when I check a particular sample(e.g. C_ID_1c8a5b9d44) in historical_transactions.csv, the time range is about a year(2017/01/25 ~ 2018/02/27). Is this consistent with the <strong>Data Description</strong> ?</p>\n\n<p>I do statistic for every <code>card_id</code> in <code>historical_transactions.csv</code>. The time range is not 3 month for most <code>card_id</code>s.</p>\n\n<p><img src=\"http://youdao.pythonplus.cn/hist_time_range_hist.PNG\" alt=\"\"></p>",
  "messages": [
    {
      "id": "436237",
      "postDate": "12/10/2018 00:49:32",
      "content": "<p>In <strong>Data Description</strong>, historical_transactions.csv is described as:\n&gt; historical_transactions.csv contains up to 3 months' worth of\n&gt; transactions for every card at any of the provided <code>merchant_ids</code>.</p>\n\n<p>But when I check a particular sample(e.g. C_ID_1c8a5b9d44) in historical_transactions.csv, the time range is about a year(2017/01/25 ~ 2018/02/27). Is this consistent with the <strong>Data Description</strong> ?</p>\n\n<p>I do statistic for every <code>card_id</code> in <code>historical_transactions.csv</code>. The time range is not 3 month for most <code>card_id</code>s.</p>\n\n<p><img src=\"http://youdao.pythonplus.cn/hist_time_range_hist.PNG\" alt=\"\"></p>",
      "rawMarkdown": "In **Data Description**, historical_transactions.csv is described as:\n&gt; historical_transactions.csv contains up to 3 months' worth of\n&gt; transactions for every card at any of the provided `merchant_ids`.\n\nBut when I check a particular sample(e.g. C_ID_1c8a5b9d44) in historical_transactions.csv, the time range is about a year(2017/01/25 ~ 2018/02/27). Is this consistent with the **Data Description** ?\n\nI do statistic for every `card_id` in `historical_transactions.csv`. The time range is not 3 month for most `card_id`s.\n\n![](http://youdao.pythonplus.cn/hist_time_range_hist.PNG)",
      "votes": null
    },
    {
      "id": "436254",
      "postDate": "12/10/2018 01:52:25",
      "content": "<p>3 month is the range for specific <code>card_id</code></p>",
      "rawMarkdown": "3 month is the range for specific `card_id`",
      "votes": null
    },
    {
      "id": "436258",
      "postDate": "12/10/2018 02:10:29",
      "content": "<p>Thanks for your answer! But I do statistics for every <code>card_id</code> in <code>historical_transactions.csv</code>. The time range is not 3 month for most of <code>card_id</code>s.\n<img src=\"http://youdao.pythonplus.cn/time_range_hist.PNG\" alt=\"\"></p>",
      "rawMarkdown": "Thanks for your answer! But I do statistics for every `card_id` in `historical_transactions.csv`. The time range is not 3 month for most of `card_id`s.\n![](http://youdao.pythonplus.cn/time_range_hist.PNG)",
      "votes": null
    },
    {
      "id": "436427",
      "postDate": "12/10/2018 09:32:10",
      "content": "<p>Sorry, I didn't get you right. Have you tried to count unique days for every <code>card_id</code>?</p>",
      "rawMarkdown": "Sorry, I didn't get you right. Have you tried to count unique days for every `card_id`?",
      "votes": null
    },
    {
      "id": "436433",
      "postDate": "12/10/2018 09:57:55",
      "content": "<p>yes, I aggregate for every <code>card_id</code>:\n<code>python\nhist_trans = pd.read_csv('../input/historical_transactions.csv')\nhist_trans.purchase_date = pd.to_datetime(hist_trans.purchase_date)\nhist_trans.groupby('card_id')['purchase_date'].agg([np.min, np.max])\n</code>\nI get the time range for each <code>card_id</code> and do the statistics.\nFor details, please see this <a href=\"https://www.kaggle.com/jiazhuang/basic-info-about-historical-new-transactions\">Basic info about historical/new transactions\n</a></p>",
      "rawMarkdown": "yes, I aggregate for every `card_id`:\n```python\nhist_trans = pd.read_csv('../input/historical_transactions.csv')\nhist_trans.purchase_date = pd.to_datetime(hist_trans.purchase_date)\nhist_trans.groupby('card_id')['purchase_date'].agg([np.min, np.max])\n```\nI get the time range for each `card_id` and do the statistics.\nFor details, please see this [Basic info about historical/new transactions\n](https://www.kaggle.com/jiazhuang/basic-info-about-historical-new-transactions)",
      "votes": null
    },
    {
      "id": "436445",
      "postDate": "12/10/2018 10:30:56",
      "content": "<p>I mean that \"3 months\" may be some 90 unique days with transactions, not the continuous time range. It is very questionable assumption but I have no other ideas.</p>",
      "rawMarkdown": "I mean that \"3 months\" may be some 90 unique days with transactions, not the continuous time range. It is very questionable assumption but I have no other ideas.",
      "votes": null
    },
    {
      "id": "438628",
      "postDate": "12/14/2018 00:43:13",
      "content": "<p>I have found an answer!  <a href=\"https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646\">https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646</a></p>",
      "rawMarkdown": "I have found an answer!  https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646",
      "votes": null
    },
    {
      "id": "438631",
      "postDate": "12/14/2018 00:51:13",
      "content": "<p>Thanks, I also see than yesterday. They say <strong>at least 3 months</strong>. I think they should be more cautious.</p>",
      "rawMarkdown": "Thanks, I also see than yesterday. They say **at least 3 months**. I think they should be more cautious.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 436254,
      "author_name": "lumaxy",
      "author_url": "",
      "post_date": "12/10/2018 01:52:25",
      "content": "<p>3 month is the range for specific <code>card_id</code></p>",
      "votes": null,
      "replies": [
        {
          "id": 436258,
          "author_name": "jiazhuang",
          "author_url": "",
          "post_date": "12/10/2018 02:10:29",
          "content": "<p>Thanks for your answer! But I do statistics for every <code>card_id</code> in <code>historical_transactions.csv</code>. The time range is not 3 month for most of <code>card_id</code>s.\n<img src=\"http://youdao.pythonplus.cn/time_range_hist.PNG\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 436427,
          "author_name": "lumaxy",
          "author_url": "",
          "post_date": "12/10/2018 09:32:10",
          "content": "<p>Sorry, I didn't get you right. Have you tried to count unique days for every <code>card_id</code>?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 436433,
          "author_name": "jiazhuang",
          "author_url": "",
          "post_date": "12/10/2018 09:57:55",
          "content": "<p>yes, I aggregate for every <code>card_id</code>:\n<code>python\nhist_trans = pd.read_csv('../input/historical_transactions.csv')\nhist_trans.purchase_date = pd.to_datetime(hist_trans.purchase_date)\nhist_trans.groupby('card_id')['purchase_date'].agg([np.min, np.max])\n</code>\nI get the time range for each <code>card_id</code> and do the statistics.\nFor details, please see this <a href=\"https://www.kaggle.com/jiazhuang/basic-info-about-historical-new-transactions\">Basic info about historical/new transactions\n</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 436445,
          "author_name": "lumaxy",
          "author_url": "",
          "post_date": "12/10/2018 10:30:56",
          "content": "<p>I mean that \"3 months\" may be some 90 unique days with transactions, not the continuous time range. It is very questionable assumption but I have no other ideas.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 438628,
          "author_name": "lumaxy",
          "author_url": "",
          "post_date": "12/14/2018 00:43:13",
          "content": "<p>I have found an answer!  <a href=\"https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646\">https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 438631,
          "author_name": "jiazhuang",
          "author_url": "",
          "post_date": "12/14/2018 00:51:13",
          "content": "<p>Thanks, I also see than yesterday. They say <strong>at least 3 months</strong>. I think they should be more cautious.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "436237": "In **Data Description**, historical_transactions.csv is described as:\n&gt; historical_transactions.csv contains up to 3 months' worth of\n&gt; transactions for every card at any of the provided `merchant_ids`.\n\nBut when I check a particular sample(e.g. C_ID_1c8a5b9d44) in historical_transactions.csv, the time range is about a year(2017/01/25 ~ 2018/02/27). Is this consistent with the **Data Description** ?\n\nI do statistic for every `card_id` in `historical_transactions.csv`. The time range is not 3 month for most `card_id`s.\n\n![](http://youdao.pythonplus.cn/hist_time_range_hist.PNG)",
    "436254": "3 month is the range for specific `card_id`",
    "436258": "Thanks for your answer! But I do statistics for every `card_id` in `historical_transactions.csv`. The time range is not 3 month for most of `card_id`s.\n![](http://youdao.pythonplus.cn/time_range_hist.PNG)",
    "436427": "Sorry, I didn't get you right. Have you tried to count unique days for every `card_id`?",
    "436433": "yes, I aggregate for every `card_id`:\n```python\nhist_trans = pd.read_csv('../input/historical_transactions.csv')\nhist_trans.purchase_date = pd.to_datetime(hist_trans.purchase_date)\nhist_trans.groupby('card_id')['purchase_date'].agg([np.min, np.max])\n```\nI get the time range for each `card_id` and do the statistics.\nFor details, please see this [Basic info about historical/new transactions\n](https://www.kaggle.com/jiazhuang/basic-info-about-historical-new-transactions)",
    "436445": "I mean that \"3 months\" may be some 90 unique days with transactions, not the continuous time range. It is very questionable assumption but I have no other ideas.",
    "438628": "I have found an answer!  https://www.kaggle.com/c/elo-merchant-category-recommendation/discussion/72993#436646",
    "438631": "Thanks, I also see than yesterday. They say **at least 3 months**. I think they should be more cautious."
  },
  "source": "meta"
}