{"action":"closed","issue":{"url":"https://api.github.com/repos/h5py/h5py/issues/603","labels_url":"https://api.github.com/repos/h5py/h5py/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/h5py/h5py/issues/603/comments","events_url":"https://api.github.com/repos/h5py/h5py/issues/603/events","html_url":"https://github.com/h5py/h5py/issues/603","id":99058148,"number":603,"title":"Dataset column that holds a list of words","user":{"login":"jhenriquetdg","id":2962558,"avatar_url":"https://avatars.githubusercontent.com/u/2962558?v=3","gravatar_id":"","url":"https://api.github.com/users/jhenriquetdg","html_url":"https://github.com/jhenriquetdg","followers_url":"https://api.github.com/users/jhenriquetdg/followers","following_url":"https://api.github.com/users/jhenriquetdg/following{/other_user}","gists_url":"https://api.github.com/users/jhenriquetdg/gists{/gist_id}","starred_url":"https://api.github.com/users/jhenriquetdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhenriquetdg/subscriptions","organizations_url":"https://api.github.com/users/jhenriquetdg/orgs","repos_url":"https://api.github.com/users/jhenriquetdg/repos","events_url":"https://api.github.com/users/jhenriquetdg/events{/privacy}","received_events_url":"https://api.github.com/users/jhenriquetdg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-04T20:44:16Z","updated_at":"2015-08-27T06:22:18Z","closed_at":"2015-08-27T06:22:18Z","body":"I am interested on using h5py (HDF5 module for python) for text mining. I have a list of filenames 'text_list' and a list of list of words in each text 'list_words'. I want to create a file called 'mydb.dhf5' containing a dataset 'text' with the columns 'filename' - containing the text filename - and 'words' - containing the list of words on each text.\r\n\r\nI tryed to do the following:\r\n\r\n          import h5py\r\n          import numpy\r\n          \r\n          db_file = h5py.File('mydb.hdf5','a')\r\n          \r\n          special = lambda x: h5py.special_dtype(vlen=x);\r\n          \r\n          db_text_dt = numpy.dtype([('filename',special(str)),('words',special(special(str)))])\r\n          db_text    = db_file.create_dataset('text',shape=(N,),dtype=db_text_dt)\r\n          \r\n          for t,text in enumerate(db_text):\r\n              text['filename'] = text_list[t]\r\n              text['words']    = text_words[t]\r\n              db_text[t] = text\r\n          \r\n          db_file.flush()\r\n          db_file.close()\r\n\r\nI appreciate any discurssion about the topic. Thanks.\r\n"}}