Sep-18-2020, 01:36 AM
Hello,
I have a table with three columns and multiple rows. I know how to extract specific rows using table[0:5]. How can I extract just the elements of first two columns for these 5 rows?
Here is what I tried to extract the rows:
I have a table with three columns and multiple rows. I know how to extract specific rows using table[0:5]. How can I extract just the elements of first two columns for these 5 rows?
Here is what I tried to extract the rows:
1 2 3 4 5 6 7 |
infile = 'table.h5' f2 = tables.open_file(infile, "r" ) table = f2.root.dataset_1.read() print (table[ 0 : 5 ]) #this gives me five rows with all columns |