# Import data from dataframe parquet into vds

**URL:** <https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585>\
**Category:** Help \[0.1\]\
**Created:** [July 24, 2018, 6:22pm UTC](https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585 "2018-07-24T18:22:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![palakpsheth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/palakpsheth/32/172_2.png) [@palakpsheth](https://discuss.hail.is/u/palakpsheth)\
**Post date:** [July 24, 2018, 6:22pm UTC](https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585/1 "2018-07-24T18:22:28Z")

</div>

Hello,

Is there a way to import data stored in a dataframe parquet into a HAIL format? For example I have a df with chrom, pos, ref, alt, qual, filter, rsid, and a array samples column with each sample struct containing sampleId, GT, DP, prob\_hom\_ref, prob\_het, and prob\_hom\_alt all as separate columns. The whole df are about 1 million variants and 10k samples.

Thanks so much!

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [July 24, 2018, 6:26pm UTC](https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585/2 "2018-07-24T18:26:02Z")

</div>

you can get into a Hail table with [`hl.Table.from_spark`](https://hail.is/docs/devel/hail.Table.html?highlight=from_spark#hail.Table.from_spark). To go to a MatrixTable is a bit harder – I’ll think that over. We might need a new function.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [July 24, 2018, 6:35pm UTC](https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585/3 "2018-07-24T18:35:35Z")

</div>

are the arrays all in the same order?

---

<div class="post-metadata">

**Author:** ![palakpsheth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/palakpsheth/32/172_2.png) [@palakpsheth](https://discuss.hail.is/u/palakpsheth)\
**Post date:** [July 24, 2018, 6:47pm UTC](https://discuss.hail.is/t/import-data-from-dataframe-parquet-into-vds/585/4 "2018-07-24T18:47:40Z")

</div>

Thanks I’ll look at that function.

The array of sample info COULD be in the same order sorting the array by the sampleId field in each sample struct
