How to get index of rows(pandas dataframe row analog)

Hi,

I need to add a list of values to specific indices of pandas row equivalent in the hail table.
In pandas, we can use df.iloc to access those indices. Is there an equivalent function to it?

Regards,
Gopi

This really sounds like a join. Can you give the example of what you want to do in pandas? We can help translate that to Hail equivalents.

Hi,
Thanks for replying. Below is the example
ex:
data has a column named xyz,abc and values in range a-z.

xyz  abc
------------
a       b
b       r
d       s
g       q
h       y

we now need to add a new column named ABC which has a list of values from the row given below

xyz  abc   ABC
---------------------
a       b     ['a','b']
b       r      ['b','r']
d       s     ['d','s']
g       q     ['g','q']
h       y     ['h','y']

If you have a hail table ht with fields xyz and abc, you can do:

ht = ht.annotate(ABC=hl.array([ht.xyz, ht.abc]))