I have to know how to use hdfql to import multiple csv files into one hdf5 file using hdfql method?
Asked
Active
Viewed 184 times
0
-
Can you provide a link to one of your CSV file (just to see how it looks)? Do you want to import data from CSV files into one or multiple HDF5 datasets? – SOG Oct 05 '20 at 07:31
-
yes into multiple datasets for example i have a path like this :/root/data/data1 in data1 all csv files are there if how to creat one hdf5 file contain the groups root-data-data1 and in the last group add the csv files in multiple datasets! – M-kh Oct 05 '20 at 07:50
-
1Thanks for the info - it's a bit clearer. Do you mind to share a link to one of your CSV file as it is important to know what kind of data (e.g. string, int) is stored in it so that the dataset is created with the proper data type. – SOG Oct 05 '20 at 07:56
-
actually I don't have a link, but my csv files contain string and numbers let me just prepare a link and share it with you thanks again for your support ,BTW the csv files don't have the same structure they are different and the max size of each file less than 2mb – M-kh Oct 05 '20 at 08:29
-
I use NumPy `genfromtxt()` to read CSV files. It creates a NumPy recarray when you have mixed datatypes (ints, floats, strings, etc). There are several parameters to control reading. Read the `np.genfromtxt` docs or search for SO articles for details and examples. – kcw78 Oct 05 '20 at 16:23