{
  "id": 9435,
  "title": "How many trips did customer #712.692.969 make?",
  "url": "/competitions/acquire-valued-shoppers-challenge/discussion/9435",
  "author_name": "",
  "post_date": "2014-06-11T03:02:50.407Z",
  "votes": null,
  "comment_count": 2,
  "views": 1108,
  "content": "<p>In the <em>transactions.csv</em> file, I found that customer #712.692.969 had 1 transaction on 2013-04-21. I discovered this from an SQL table I created with&nbsp;<em>transacitons.csv</em>, but the following Python code can confirm:</p>\n\n<p><code>f = open(&quot;transactions.csv&quot;, 'rb', 1024 * 1024 * 128)<br>for line in f:<br>&nbsp; &nbsp; if &quot;712692969&quot; in line:<br>&nbsp; &nbsp; print line</code></p>\n<p><code># output: 712692969,89,21,2119,108079383,6926,2013-04-21,144,OZ,3,11</code></p>\n\n<p>On the other hand, from&nbsp;<em>trainHistory.csv</em>&nbsp;line #72.077 we have:</p>\n\n<p><code>712692969,89,1208329,16,8,t,2013-04-29</code></p>\n\n<p>which implies 8 repeat trips and says the customer was a repeater. Since the offer came after the transaction this would seem to contradict the&nbsp;<em>transactions.csv</em> data.</p>\n<p>Did I mess this up? Am I misinterpreting the <em>repeattrips</em> column? I.e., do these repeat trips include trips after the cutoff of&nbsp;<em>transactions.csv</em>?</p>",
  "messages": [
    {
      "id": "48972",
      "postDate": "06/11/2014 03:02:50",
      "content": "<p>In the <em>transactions.csv</em> file, I found that customer #712.692.969 had 1 transaction on 2013-04-21. I discovered this from an SQL table I created with&nbsp;<em>transacitons.csv</em>, but the following Python code can confirm:</p>\n\n<p><code>f = open(&quot;transactions.csv&quot;, 'rb', 1024 * 1024 * 128)<br>for line in f:<br>&nbsp; &nbsp; if &quot;712692969&quot; in line:<br>&nbsp; &nbsp; print line</code></p>\n<p><code># output: 712692969,89,21,2119,108079383,6926,2013-04-21,144,OZ,3,11</code></p>\n\n<p>On the other hand, from&nbsp;<em>trainHistory.csv</em>&nbsp;line #72.077 we have:</p>\n\n<p><code>712692969,89,1208329,16,8,t,2013-04-29</code></p>\n\n<p>which implies 8 repeat trips and says the customer was a repeater. Since the offer came after the transaction this would seem to contradict the&nbsp;<em>transactions.csv</em> data.</p>\n<p>Did I mess this up? Am I misinterpreting the <em>repeattrips</em> column? I.e., do these repeat trips include trips after the cutoff of&nbsp;<em>transactions.csv</em>?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "48979",
      "postDate": "06/11/2014 06:01:47",
      "content": "<p>It means that id &quot;712692969&quot; made 8 repeat trips after he got the offer on 2013-04-29. The data in transactions.csv corresponds to visit by this customer before offer date. (Usually 1 year history data). </p>\n\n<p>I don't see any contradiction.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "48998",
      "postDate": "06/11/2014 14:18:54",
      "content": "<p>Thanks -- I missed the part about all the data being historical</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 48979,
      "author_name": "hrishi",
      "author_url": "",
      "post_date": "06/11/2014 06:01:47",
      "content": "<p>It means that id &quot;712692969&quot; made 8 repeat trips after he got the offer on 2013-04-29. The data in transactions.csv corresponds to visit by this customer before offer date. (Usually 1 year history data). </p>\n\n<p>I don't see any contradiction.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 48998,
      "author_name": "felipeo",
      "author_url": "",
      "post_date": "06/11/2014 14:18:54",
      "content": "<p>Thanks -- I missed the part about all the data being historical</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "48972": "",
    "48979": "",
    "48998": ""
  },
  "source": "meta"
}