In hail 0.1, is it possible to export variants table with selected columns into a pandas dataframe?

Hi everyone,

I’m new to hail. I’m looking for some function like the following one:

vds.export_variants(‘output/file.tsv’, ‘variant = v, QC = va.qc.*’)

However, instead of saving it into a file, I’d like to receive a pandas dataframe for downstream analysis. Could anyone please let me know the correct function to use? Thank you!

Best regards,

Hi Wei, yes, you can first use variants_table to get a KeyTable, select your fields of interest, and go to_pandas.

However, especially as you’re new to Hail, I’d recommend you upgrade to 0.2 beta now. There the first command is rows.

Thank you @jbloom! I tried “variants_table” but it seems that I can only select “v” and “va” but not something like “va.qc.*”, right?

Anyway, thanks for suggesting the migration to v0.2. I’ll definitely look into it.