{"action":"created","comment":{"url":"https://api.github.com/repos/h5io/h5io/pulls/comments/48057997","id":48057997,"diff_hunk":"@@ -86,23 +99,37 @@ def write_hdf5(fname, data, overwrite=False, compression=4,\n     with h5py.File(fname, mode=mode) as fid:\n         if title in fid:\n             del fid[title]\n-        _triage_write(title, data, fid, comp_kw, str(type(data)))\n-\n-\n-def _triage_write(key, value, root, comp_kw, where):\n+        cleanup_data = []\n+        cleanup_data = _triage_write(title, data, fid, comp_kw,\n+                                     str(type(data)),\n+                                     cleanup_data=cleanup_data)\n+\n+    # Will not be empty if any extra data to be written\n+    for data in cleanup_data:\n+        # In case different extra I/O needs different inputs\n+        title = data.keys()[0]\n+        if title in ['pd_dataframe', 'pd_series']:\n+            rootname, key, value = data[title]\n+            _create_pandas_dataset(fname, rootname, key, title, value)\n+\n+\n+def _triage_write(key, value, root, comp_kw, where, cleanup_data=None):\n+    cleanup_data = [] if cleanup_data is None else cleanup_data\n     if isinstance(value, dict):\n         sub_root = _create_titled_group(root, key, 'dict')\n         for key, sub_value in value.items():\n             if not isinstance(key, string_types):\n                 raise TypeError('All dict keys must be strings')\n-            _triage_write('key_{0}'.format(key), sub_value, sub_root, comp_kw,\n-                          where + '[\"%s\"]' % key)\n+            cleanup_data = _triage_write(\n+                'key_{0}'.format(key), sub_value, sub_root, comp_kw,\n+                where + '[\"%s\"]' % key, cleanup_data=cleanup_data)\n     elif isinstance(value, (list, tuple)):\n         title = 'list' if isinstance(value, list) else 'tuple'\n         sub_root = _create_titled_group(root, key, title)\n         for vi, sub_value in enumerate(value):\n-            _triage_write('idx_{0}'.format(vi), sub_value, sub_root, comp_kw,\n-                          where + '[%s]' % vi)\n+            cleanup_data = _triage_write(","path":"h5io/_h5io.py","position":67,"original_position":67,"commit_id":"29d2a65195524eee56c6858bd9c8a7c8b976d437","original_commit_id":"29d2a65195524eee56c6858bd9c8a7c8b976d437","user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"body":"etc.","created_at":"2015-12-18T19:07:27Z","updated_at":"2015-12-18T19:07:27Z","html_url":"https://github.com/h5io/h5io/pull/5#discussion_r48057997","pull_request_url":"https://api.github.com/repos/h5io/h5io/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/h5io/h5io/pulls/comments/48057997"},"html":{"href":"https://github.com/h5io/h5io/pull/5#discussion_r48057997"},"pull_request":{"href":"https://api.github.com/repos/h5io/h5io/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/h5io/h5io/pulls/5","id":54127900,"html_url":"https://github.com/h5io/h5io/pull/5","diff_url":"https://github.com/h5io/h5io/pull/5.diff","patch_url":"https://github.com/h5io/h5io/pull/5.patch","issue_url":"https://api.github.com/repos/h5io/h5io/issues/5","number":5,"state":"open","locked":false,"title":"Add pandas io","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"body":"Adds read / write functionality for pandas dataframes (maybe series as well)","created_at":"2015-12-18T17:24:22Z","updated_at":"2015-12-18T19:07:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb2b52fbeaf79240045593df0d28e20e829aa016","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/h5io/h5io/pulls/5/commits","review_comments_url":"https://api.github.com/repos/h5io/h5io/pulls/5/comments","review_comment_url":"https://api.github.com/repos/h5io/h5io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h5io/h5io/issues/5/comments","statuses_url":"https://api.github.com/repos/h5io/h5io/statuses/29d2a65195524eee56c6858bd9c8a7c8b976d437","head":{"label":"choldgraf:add_pandas_io","ref":"add_pandas_io","sha":"29d2a65195524eee56c6858bd9c8a7c8b976d437","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"repo":{"id":48009877,"name":"h5io","full_name":"choldgraf/h5io","owner":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choldgraf/h5io","description":"Read and write simple Python objects using HDF5","fork":true,"url":"https://api.github.com/repos/choldgraf/h5io","forks_url":"https://api.github.com/repos/choldgraf/h5io/forks","keys_url":"https://api.github.com/repos/choldgraf/h5io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choldgraf/h5io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choldgraf/h5io/teams","hooks_url":"https://api.github.com/repos/choldgraf/h5io/hooks","issue_events_url":"https://api.github.com/repos/choldgraf/h5io/issues/events{/number}","events_url":"https://api.github.com/repos/choldgraf/h5io/events","assignees_url":"https://api.github.com/repos/choldgraf/h5io/assignees{/user}","branches_url":"https://api.github.com/repos/choldgraf/h5io/branches{/branch}","tags_url":"https://api.github.com/repos/choldgraf/h5io/tags","blobs_url":"https://api.github.com/repos/choldgraf/h5io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choldgraf/h5io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choldgraf/h5io/git/refs{/sha}","trees_url":"https://api.github.com/repos/choldgraf/h5io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choldgraf/h5io/statuses/{sha}","languages_url":"https://api.github.com/repos/choldgraf/h5io/languages","stargazers_url":"https://api.github.com/repos/choldgraf/h5io/stargazers","contributors_url":"https://api.github.com/repos/choldgraf/h5io/contributors","subscribers_url":"https://api.github.com/repos/choldgraf/h5io/subscribers","subscription_url":"https://api.github.com/repos/choldgraf/h5io/subscription","commits_url":"https://api.github.com/repos/choldgraf/h5io/commits{/sha}","git_commits_url":"https://api.github.com/repos/choldgraf/h5io/git/commits{/sha}","comments_url":"https://api.github.com/repos/choldgraf/h5io/comments{/number}","issue_comment_url":"https://api.github.com/repos/choldgraf/h5io/issues/comments{/number}","contents_url":"https://api.github.com/repos/choldgraf/h5io/contents/{+path}","compare_url":"https://api.github.com/repos/choldgraf/h5io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choldgraf/h5io/merges","archive_url":"https://api.github.com/repos/choldgraf/h5io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choldgraf/h5io/downloads","issues_url":"https://api.github.com/repos/choldgraf/h5io/issues{/number}","pulls_url":"https://api.github.com/repos/choldgraf/h5io/pulls{/number}","milestones_url":"https://api.github.com/repos/choldgraf/h5io/milestones{/number}","notifications_url":"https://api.github.com/repos/choldgraf/h5io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choldgraf/h5io/labels{/name}","releases_url":"https://api.github.com/repos/choldgraf/h5io/releases{/id}","created_at":"2015-12-15T00:33:35Z","updated_at":"2015-12-15T00:33:35Z","pushed_at":"2015-12-18T19:00:52Z","git_url":"git://github.com/choldgraf/h5io.git","ssh_url":"git@github.com:choldgraf/h5io.git","clone_url":"https://github.com/choldgraf/h5io.git","svn_url":"https://github.com/choldgraf/h5io","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"h5io:master","ref":"master","sha":"a73bba4f38f0d96473b1ce6b59a018b45866c771","user":{"login":"h5io","id":13875247,"avatar_url":"https://avatars.githubusercontent.com/u/13875247?v=3","gravatar_id":"","url":"https://api.github.com/users/h5io","html_url":"https://github.com/h5io","followers_url":"https://api.github.com/users/h5io/followers","following_url":"https://api.github.com/users/h5io/following{/other_user}","gists_url":"https://api.github.com/users/h5io/gists{/gist_id}","starred_url":"https://api.github.com/users/h5io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h5io/subscriptions","organizations_url":"https://api.github.com/users/h5io/orgs","repos_url":"https://api.github.com/users/h5io/repos","events_url":"https://api.github.com/users/h5io/events{/privacy}","received_events_url":"https://api.github.com/users/h5io/received_events","type":"Organization","site_admin":false},"repo":{"id":41055663,"name":"h5io","full_name":"h5io/h5io","owner":{"login":"h5io","id":13875247,"avatar_url":"https://avatars.githubusercontent.com/u/13875247?v=3","gravatar_id":"","url":"https://api.github.com/users/h5io","html_url":"https://github.com/h5io","followers_url":"https://api.github.com/users/h5io/followers","following_url":"https://api.github.com/users/h5io/following{/other_user}","gists_url":"https://api.github.com/users/h5io/gists{/gist_id}","starred_url":"https://api.github.com/users/h5io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h5io/subscriptions","organizations_url":"https://api.github.com/users/h5io/orgs","repos_url":"https://api.github.com/users/h5io/repos","events_url":"https://api.github.com/users/h5io/events{/privacy}","received_events_url":"https://api.github.com/users/h5io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/h5io/h5io","description":"Read and write simple Python objects using HDF5","fork":false,"url":"https://api.github.com/repos/h5io/h5io","forks_url":"https://api.github.com/repos/h5io/h5io/forks","keys_url":"https://api.github.com/repos/h5io/h5io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h5io/h5io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h5io/h5io/teams","hooks_url":"https://api.github.com/repos/h5io/h5io/hooks","issue_events_url":"https://api.github.com/repos/h5io/h5io/issues/events{/number}","events_url":"https://api.github.com/repos/h5io/h5io/events","assignees_url":"https://api.github.com/repos/h5io/h5io/assignees{/user}","branches_url":"https://api.github.com/repos/h5io/h5io/branches{/branch}","tags_url":"https://api.github.com/repos/h5io/h5io/tags","blobs_url":"https://api.github.com/repos/h5io/h5io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h5io/h5io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h5io/h5io/git/refs{/sha}","trees_url":"https://api.github.com/repos/h5io/h5io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h5io/h5io/statuses/{sha}","languages_url":"https://api.github.com/repos/h5io/h5io/languages","stargazers_url":"https://api.github.com/repos/h5io/h5io/stargazers","contributors_url":"https://api.github.com/repos/h5io/h5io/contributors","subscribers_url":"https://api.github.com/repos/h5io/h5io/subscribers","subscription_url":"https://api.github.com/repos/h5io/h5io/subscription","commits_url":"https://api.github.com/repos/h5io/h5io/commits{/sha}","git_commits_url":"https://api.github.com/repos/h5io/h5io/git/commits{/sha}","comments_url":"https://api.github.com/repos/h5io/h5io/comments{/number}","issue_comment_url":"https://api.github.com/repos/h5io/h5io/issues/comments{/number}","contents_url":"https://api.github.com/repos/h5io/h5io/contents/{+path}","compare_url":"https://api.github.com/repos/h5io/h5io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h5io/h5io/merges","archive_url":"https://api.github.com/repos/h5io/h5io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h5io/h5io/downloads","issues_url":"https://api.github.com/repos/h5io/h5io/issues{/number}","pulls_url":"https://api.github.com/repos/h5io/h5io/pulls{/number}","milestones_url":"https://api.github.com/repos/h5io/h5io/milestones{/number}","notifications_url":"https://api.github.com/repos/h5io/h5io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h5io/h5io/labels{/name}","releases_url":"https://api.github.com/repos/h5io/h5io/releases{/id}","created_at":"2015-08-19T19:35:41Z","updated_at":"2015-09-28T23:34:56Z","pushed_at":"2015-12-18T19:00:52Z","git_url":"git://github.com/h5io/h5io.git","ssh_url":"git@github.com:h5io/h5io.git","clone_url":"https://github.com/h5io/h5io.git","svn_url":"https://github.com/h5io/h5io","homepage":null,"size":25,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h5io/h5io/pulls/5"},"html":{"href":"https://github.com/h5io/h5io/pull/5"},"issue":{"href":"https://api.github.com/repos/h5io/h5io/issues/5"},"comments":{"href":"https://api.github.com/repos/h5io/h5io/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/h5io/h5io/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/h5io/h5io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h5io/h5io/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/h5io/h5io/statuses/29d2a65195524eee56c6858bd9c8a7c8b976d437"}}}}