Python Forum
Reading a table generated using PyTables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading a table generated using PyTables
#1
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:


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
Reply
#2
show runnable code, and please, where did you get this package from?
PyPi's closest entry is pytables, last updated 2008.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Automating PyTables Dataset Creation and Append Robotguy 1 77 Oct-18-2020, 08:35 PM
Last Post: jefsummers
  Pytables: Reducing size of an appended Earray Robotguy 0 311 Aug-19-2020, 05:35 PM
Last Post: Robotguy
  Using Pytables to Sort Large Arrays? Robotguy 0 336 Aug-12-2020, 03:35 PM
Last Post: Robotguy
  Match a table with sub-total values to its detail value table klllmmm 2 1,699 Apr-03-2019, 11:28 AM
Last Post: klllmmm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020