{
  "id": 71140,
  "title": "How did you parse customDimensions & hits columns?",
  "url": "/competitions/ga-customer-revenue-prediction/discussion/71140",
  "author_name": "MuhammedBuyukkinaci",
  "post_date": "2018-11-10T15:42:05.189000",
  "votes": 1,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I wonder how you parsed these 2 columns (customDimensions &amp; hits)  . Most of the big data is coming from these 2 columns. json_normalize gives an error below:\n<em>AttributeError: 'list' object has no attribute 'values'</em></p>",
  "messages": [
    {
      "id": 418809,
      "postDate": "2018-11-10T16:42:00.480Z",
      "content": "<p>Hello Muhammed,\nI managed to begin the transformation right here (<a href=\"https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059\">https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059</a> ) but i'm stuck with some values that get the same error as you</p>",
      "rawMarkdown": "Hello Muhammed,\nI managed to begin the transformation right here (https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059 ) but i'm stuck with some values that get the same error as you",
      "votes": 1,
      "replies": [
        {
          "id": 418814,
          "postDate": "2018-11-10T16:55:17.897Z",
          "content": "<p>The link is broken :((</p>",
          "rawMarkdown": "The link is broken :(("
        },
        {
          "id": 418822,
          "postDate": "2018-11-10T17:09:18.730Z",
          "content": "<p>Changed :)</p>",
          "rawMarkdown": "Changed :)",
          "votes": 1
        }
      ]
    },
    {
      "id": 418778,
      "postDate": "2018-11-10T15:42:05.190Z",
      "content": "<p>I wonder how you parsed these 2 columns (customDimensions &amp; hits)  . Most of the big data is coming from these 2 columns. json_normalize gives an error below:\n<em>AttributeError: 'list' object has no attribute 'values'</em></p>",
      "rawMarkdown": "I wonder how you parsed these 2 columns (customDimensions &amp; hits)  . Most of the big data is coming from these 2 columns. json_normalize gives an error below:\n*AttributeError: 'list' object has no attribute 'values'*\n",
      "votes": 1
    },
    {
      "id": 419277,
      "postDate": "2018-11-11T16:15:45.113Z",
      "content": "<p>Here’s how I did it:</p>\n\n<p>Hits: <a href=\"https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column\">https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column</a></p>\n\n<p>Rest: <a href=\"https://www.kaggle.com/burritodan/gstore-1-flatten\">https://www.kaggle.com/burritodan/gstore-1-flatten</a></p>",
      "rawMarkdown": "Here’s how I did it:\n\nHits: https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column\n\nRest: https://www.kaggle.com/burritodan/gstore-1-flatten\n\n",
      "votes": 2,
      "replies": [
        {
          "id": 419288,
          "postDate": "2018-11-11T16:29:31.707Z",
          "content": "<p>Congrats Dan ! Thank you very much :)</p>",
          "rawMarkdown": "Congrats Dan ! Thank you very much :)"
        }
      ]
    },
    {
      "id": 418997,
      "postDate": "2018-11-11T03:42:38.263Z",
      "content": "<p>Hi!, Muhammed, I used this in my implementation,\ndf['hits'] = df['hits'].apply(literal_eval).str[0]\ndf = df[pd.notnull(df['hits'])]</p>\n\n<p>I got the idea from this Kernel:\n<a href=\"https://www.kaggle.com/usmanabbas/load-data-faster-with-hdf\">https://www.kaggle.com/usmanabbas/load-data-faster-with-hdf</a></p>",
      "rawMarkdown": "Hi!, Muhammed, I used this in my implementation,\ndf['hits'] = df['hits'].apply(literal_eval).str[0]\ndf = df[pd.notnull(df['hits'])]\n\nI got the idea from this Kernel:\nhttps://www.kaggle.com/usmanabbas/load-data-faster-with-hdf",
      "votes": 2
    },
    {
      "id": 419115,
      "postDate": "2018-11-11T09:59:03.670Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 418809,
      "author_name": "Y Assous",
      "author_url": "",
      "post_date": "2018-11-10T16:42:00.480000",
      "content": "<p>Hello Muhammed,\nI managed to begin the transformation right here (<a href=\"https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059\">https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059</a> ) but i'm stuck with some values that get the same error as you</p>",
      "votes": 1,
      "replies": [
        {
          "id": 418814,
          "author_name": "MuhammedBuyukkinaci",
          "author_url": "",
          "post_date": "2018-11-10T16:55:17.897000",
          "content": "<p>The link is broken :((</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 418822,
          "author_name": "Y Assous",
          "author_url": "",
          "post_date": "2018-11-10T17:09:18.730000",
          "content": "<p>Changed :)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 419277,
      "author_name": "Burrito Dan",
      "author_url": "",
      "post_date": "2018-11-11T16:15:45.113000",
      "content": "<p>Here’s how I did it:</p>\n\n<p>Hits: <a href=\"https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column\">https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column</a></p>\n\n<p>Rest: <a href=\"https://www.kaggle.com/burritodan/gstore-1-flatten\">https://www.kaggle.com/burritodan/gstore-1-flatten</a></p>",
      "votes": 2,
      "replies": [
        {
          "id": 419288,
          "author_name": "Y Assous",
          "author_url": "",
          "post_date": "2018-11-11T16:29:31.707000",
          "content": "<p>Congrats Dan ! Thank you very much :)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 418997,
      "author_name": "C4rl05/V",
      "author_url": "",
      "post_date": "2018-11-11T03:42:38.263000",
      "content": "<p>Hi!, Muhammed, I used this in my implementation,\ndf['hits'] = df['hits'].apply(literal_eval).str[0]\ndf = df[pd.notnull(df['hits'])]</p>\n\n<p>I got the idea from this Kernel:\n<a href=\"https://www.kaggle.com/usmanabbas/load-data-faster-with-hdf\">https://www.kaggle.com/usmanabbas/load-data-faster-with-hdf</a></p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 419115,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-11-11T09:59:03.670000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "418809": "Hello Muhammed,\nI managed to begin the transformation right here (https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/71059 ) but i'm stuck with some values that get the same error as you",
    "418778": "I wonder how you parsed these 2 columns (customDimensions &amp; hits)  . Most of the big data is coming from these 2 columns. json_normalize gives an error below:\n*AttributeError: 'list' object has no attribute 'values'*\n",
    "419277": "Here’s how I did it:\n\nHits: https://www.kaggle.com/burritodan/gstore-pythonic-flatten-only-hits-column\n\nRest: https://www.kaggle.com/burritodan/gstore-1-flatten\n\n",
    "418997": "Hi!, Muhammed, I used this in my implementation,\ndf['hits'] = df['hits'].apply(literal_eval).str[0]\ndf = df[pd.notnull(df['hits'])]\n\nI got the idea from this Kernel:\nhttps://www.kaggle.com/usmanabbas/load-data-faster-with-hdf",
    "419115": ""
  }
}