{
  "id": 197759,
  "title": "Simple approach to normalize the JSON data",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/197759",
  "author_name": "",
  "post_date": "2020-11-17T23:59:34.976963800Z",
  "votes": 7,
  "comment_count": 1,
  "views": 0,
  "content": "<p>You can use: </p>\n<pre><code>def load_normalize_json_data(json_file):\n   json_path = os.path.join(PATH,json_file)\n   with open(json_path) as json_file:\n       json_data = json.load(json_file)\n   json_data_df = pd.json_normalize(json_data)\n   return json_data_df\n</code></pre>\n<p>Instead of:<br>\n<code>json_data_df = pd.read_json(os.path.join(PATH,json_file))</code><br>\nThis will normalize the json data completely so you can access directly the geometry and the other properties.<br>\n<a href=\"https://www.kaggle.com/gpreda/read-json-data/data\" target=\"_blank\">Here</a>  is an example of code.</p>",
  "messages": [
    {
      "id": "1082481",
      "postDate": "11/17/2020 23:59:34",
      "content": "<p>You can use: </p>\n<pre><code>def load_normalize_json_data(json_file):\n   json_path = os.path.join(PATH,json_file)\n   with open(json_path) as json_file:\n       json_data = json.load(json_file)\n   json_data_df = pd.json_normalize(json_data)\n   return json_data_df\n</code></pre>\n<p>Instead of:<br>\n<code>json_data_df = pd.read_json(os.path.join(PATH,json_file))</code><br>\nThis will normalize the json data completely so you can access directly the geometry and the other properties.<br>\n<a href=\"https://www.kaggle.com/gpreda/read-json-data/data\" target=\"_blank\">Here</a>  is an example of code.</p>",
      "rawMarkdown": "You can use: \n```\ndef load_normalize_json_data(json_file):\n    json_path = os.path.join(PATH,json_file)\n    with open(json_path) as json_file:\n        json_data = json.load(json_file)\n    json_data_df = pd.json_normalize(json_data)\n    return json_data_df\n```\n\nInstead of:\n`json_data_df = pd.read_json(os.path.join(PATH,json_file))`\n\nThis will normalize the json data completely so you can access directly the geometry and the other properties.\n\n[Here](https://www.kaggle.com/gpreda/read-json-data/data)  is an example of code.",
      "votes": null
    },
    {
      "id": "1085221",
      "postDate": "11/20/2020 19:00:46",
      "content": "<p><a href=\"https://www.kaggle.com/gpreda\" target=\"_blank\">@gpreda</a> Thanks for sharing this Gabriel …Very helpful .</p>",
      "rawMarkdown": "gpreda Thanks for sharing this Gabriel ...Very helpful .",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1085221,
      "author_name": "usharengaraju",
      "author_url": "",
      "post_date": "11/20/2020 19:00:46",
      "content": "<p><a href=\"https://www.kaggle.com/gpreda\" target=\"_blank\">@gpreda</a> Thanks for sharing this Gabriel …Very helpful .</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1082481": "You can use: \n```\ndef load_normalize_json_data(json_file):\n    json_path = os.path.join(PATH,json_file)\n    with open(json_path) as json_file:\n        json_data = json.load(json_file)\n    json_data_df = pd.json_normalize(json_data)\n    return json_data_df\n```\n\nInstead of:\n`json_data_df = pd.read_json(os.path.join(PATH,json_file))`\n\nThis will normalize the json data completely so you can access directly the geometry and the other properties.\n\n[Here](https://www.kaggle.com/gpreda/read-json-data/data)  is an example of code.",
    "1085221": "gpreda Thanks for sharing this Gabriel ...Very helpful ."
  },
  "source": "meta"
}