# Data transformation

**URL:** <https://discuss.hail.is/t/data-transformation/2557>\
**Category:** Hail Query & hailctl\
**Created:** [March 21, 2022, 11:42pm UTC](https://discuss.hail.is/t/data-transformation/2557 "2022-03-21T23:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![biostat0903](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/biostat0903/32/750_2.png) [@biostat0903](https://discuss.hail.is/u/biostat0903)\
**Post date:** [March 21, 2022, 11:42pm UTC](https://discuss.hail.is/t/data-transformation/2557/1 "2022-03-21T23:42:40Z")

</div>

Hi,  
I would like to use Hail to analyze the biobank data. But I met a problem. After I load the plink file in python and select the SNP using Hail, I fail to transformate th Matrixtable to pands.DataFrame. Please tell me how to do it.  
My Hail version is ‘0.2.91-44b441376f9a’.

Best,  
Sheng

---

<div class="post-metadata">

**Author:** ![Abhishek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/abhishek/32/570_2.png) [@Abhishek](https://discuss.hail.is/u/Abhishek)\
**Post date:** [March 23, 2022, 9:57am UTC](https://discuss.hail.is/t/data-transformation/2557/2 "2022-03-23T09:57:00Z")

</div>

If my understanding is correct, you will can convert a hail table to a pandas dataframe easily using `ht.to_pandas()`.

You cannot convert a hail matrix table to pandas dataframe directly. You will require hail matrix table to be converted to hail table first.  
PS: Generally, you end up taking cols or rows table like `ht=mt.cols()` or `ht=mt.rows()`
