# Creating many groups by reading a file

**URL:** <https://forum.hdfgroup.org/t/creating-many-groups-by-reading-a-file/1338>\
**Category:** Hdf-forum archives\
**Created:** [July 2, 2009, 1:26am UTC](https://forum.hdfgroup.org/t/creating-many-groups-by-reading-a-file/1338 "2009-07-02T01:26:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magawake](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/m/f9ae1b/32.png) [@magawake](https://forum.hdfgroup.org/u/magawake)\
**Post date:** [July 2, 2009, 1:26am UTC](https://forum.hdfgroup.org/t/creating-many-groups-by-reading-a-file/1338/1 "2009-07-02T01:26:07Z")

</div>

Hello All,

I am a newbie to hdf5 and using the C and Python (h5py) interface to  
parse our csv/tsv research data into hdf5 format. So far, I have been  
using h5py and its been great!

I am kind of stuck trying to create multiple groups. For example here  
is how my csv file looks like:

Car, Model, Year, Price (header, so we can ignore but I will use this  
for my hdf5 structure)  
Honda, Accord, 2003, 23122  
Honda, Civic, 2004, 13122  
Honda, Accord, 2003, 22122

I would like my hdf5 datagroup to be like this:

/Car/Honda/Accord/2003/\<have a table\>  
&nbsp;&nbsp;inside the table:  
&nbsp;&nbsp;&nbsp;&nbsp;Honda, Accord, 2003, 23122  
&nbsp;&nbsp;&nbsp;&nbsp;Honda, Accord, 2003, 22122  
/Car/Honda/Civic/2003/\<have a table\>  
&nbsp;&nbsp;&nbsp;Honda, Civic, 2004, 13122

I have been playing with  
[http://www.hdfgroup.org/HDF5/doc/RM/RM\_H5G.html#Group-Create2](http://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-Create2)

But was wondering if anyone has some sample code and source files I  
can take a look at to help me out.

TIA

> **···**
>
> ----------------------------------------------------------------------  
> This mailing list is for HDF software users discussion.  
> To subscribe to this list, send a message to [hdf-forum-subscribe@hdfgroup.org](mailto:hdf-forum-subscribe@hdfgroup.org).  
> To unsubscribe, send a message to [hdf-forum-unsubscribe@hdfgroup.org](mailto:hdf-forum-unsubscribe@hdfgroup.org).
