How to add new columns in Hail table? #3663
Replies: 3 comments
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Nov 25, 2021 at 14:25) tpoterba said:We try to avoid calling table fields “columns” because “column” has a particular meaning for matrix tables, and also often connotes homogenous kinds of data between columns. The analog of a Pandas DataFrame ‘column’ is a table row field. ht = ht.annotate(esp6500siv2_all = ht[‘AA_AF’]+ht[‘EA_AF’]) |
Beta Was this translation helpful? Give feedback.
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Mar 12, 2024 at 13:02) jjfarrell said:Is there a way to specify the location of the new fields? For example, creating FID and IID fields to place in the first 2 collumns of the table. The default is to add them at the end. |
Beta Was this translation helpful? Give feedback.
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Mar 12, 2024 at 16:47) patrick-schultz said:Generally we don’t consider the order of fields significant. Why do you want them first? |
Beta Was this translation helpful? Give feedback.
-
Note
The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated.
(Nov 25, 2021 at 04:37) Gopi said:
Hi,
MatrixTable
'sannotate_cols
adds new column fields.Table
'sannotate
adds new row fields.Is there any way to add a new column to the hail table? We tried the below code but its throwing the following error “TypeError: ‘Table’ object does not support item assignment”
Code: ht[‘esp6500siv2_all’] = ht[‘AA_AF’]+ht[‘EA_AF’]
Regards,
Gopi
Beta Was this translation helpful? Give feedback.
All reactions