You can filter any column by value using the usual comparison operators


In [1]:
from gtable import Table
import numpy as np

t = Table()
t.add_column('a', np.random.rand(10))
t.add_column('b', np.arange(10))
t.add_column('s', list('abcdefghij'))

t.to_pandas()


Out[1]:
a b s
0 0.702245 0 a
1 0.343895 1 b
2 0.492234 2 c
3 0.652574 3 d
4 0.503290 4 e
5 0.383091 5 f
6 0.850866 6 g
7 0.382814 7 h
8 0.873200 8 i
9 0.761028 9 j

In [2]:
t.filter(t.a > 0.5).to_pandas()


Out[2]:
a b s
0 0.702245 0 a
1 0.652574 3 d
2 0.503290 4 e
3 0.850866 6 g
4 0.873200 8 i
5 0.761028 9 j

In [3]:
t.filter((t.a < 0.5) & (t.b <= 5)).to_pandas()


Out[3]:
a b s
0 0.343895 1 b
1 0.492234 2 c
2 0.383091 5 f

In [5]:
t.filter(t.s == 'a').to_pandas()


Out[5]:
a b s
0 0.702245 0 a

In [ ]: