Exporting table from relatedness

Hi there,

I would like to export this relatedness table/mt as a csv or tsv file and have done so as per this command:

mt.write(‘kinship_table.tsv’)

However this exports the table out as a folder instead of a single csv file that I can open up in excel. table.export(‘file.tsv’) does not work…is there something I’m missing here?

Many thanks,

Does mt.entries().export(...) do what you want here?

Hi Tim,

Thank you, that’s great! It’s worked so far as exporting a table in 2 columns. This is very large, however, creating approx 3 mill rows. How would I preserve the way the matrix is set up as per the image above, as in, how would I add the ‘key_cols_by()’ to the command you’ve just sent me?

Many thanks

Ah! I see. There’s no MatrixTable.export, but I think that mt.phi.export(...) will generate a tab-separated matrix.

That’s the one! Thanks Tim.