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


Messages In This Thread
Reading a table generated using PyTables - by Robotguy - Sep-18-2020, 01:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pytables : Printing without special characters Robotguy 0 1,681 Nov-06-2020, 10:55 PM
Last Post: Robotguy
  Automating PyTables Dataset Creation and Append Robotguy 1 1,802 Oct-18-2020, 08:35 PM
Last Post: jefsummers
  Pytables: Reducing size of an appended Earray Robotguy 0 1,649 Aug-19-2020, 05:35 PM
Last Post: Robotguy
  Using Pytables to Sort Large Arrays? Robotguy 0 2,006 Aug-12-2020, 03:35 PM
Last Post: Robotguy

Forum Jump:

User Panel Messages

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