# Best ways to filter Mt down to GT values

**URL:** <https://discuss.hail.is/t/best-ways-to-filter-mt-down-to-gt-values/3297>\
**Category:** Hail Query & hailctl\
**Created:** [March 28, 2023, 4:18pm UTC](https://discuss.hail.is/t/best-ways-to-filter-mt-down-to-gt-values/3297 "2023-03-28T16:18:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![conwei123](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@conwei123](https://discuss.hail.is/u/conwei123)\
**Post date:** [March 28, 2023, 4:18pm UTC](https://discuss.hail.is/t/best-ways-to-filter-mt-down-to-gt-values/3297/1 "2023-03-28T16:18:37Z")

</div>

Hi all, I’ve been trying to figure out the best way to get **GT values from my Mt**. I currently have a Mt consisting of the **locus** and **participants** that I am interested in extracting the **GT** value for each participant at each locus. The ultimate goal is to get all the GT values into a pandas dataframe.

In a smaller data set of **5 participants** just converting the Mt to a Ht and then using .to\_pandas() worked perfectly.

> df = mt.make\_table().to\_pandas()

Now I have a Mt of **2000 participants** and this method does not work due to memory errors.

I’ve tried a couple other ways but have been getting into dead ends. Any tips for approaching this?

---

<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:** [March 28, 2023, 10:28pm UTC](https://discuss.hail.is/t/best-ways-to-filter-mt-down-to-gt-values/3297/2 "2023-03-28T22:28:07Z")

</div>

Going through disk might make this easier, and alleviate memory a bit:

```python
mt.GT.export('some_path.tsv')
df = pd.read_table('some_path.tsv')

```
