# Keep v chr:pos:ref:alt format in variants\_table().to\_pandas()

**URL:** <https://discuss.hail.is/t/keep-v-chr-pos-ref-alt-format-in-variants-table-to-pandas/340>\
**Category:** Help \[0.1\]\
**Created:** [October 25, 2017, 4:01pm UTC](https://discuss.hail.is/t/keep-v-chr-pos-ref-alt-format-in-variants-table-to-pandas/340 "2017-10-25T16:01:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephane\_Bourgeois](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Stephane\_Bourgeois](https://discuss.hail.is/u/Stephane_Bourgeois)\
**Post date:** [October 25, 2017, 4:01pm UTC](https://discuss.hail.is/t/keep-v-chr-pos-ref-alt-format-in-variants-table-to-pandas/340/1 "2017-10-25T16:01:58Z")

</div>

I’ve tried vds.variants\_table().to\_pandas(expand=False) but it still splits v.

v va.rsid va.qual va.filters va.pass   
0 (1, 904165, G, [(G, A)]) . 52346.37 [] False  
1 (1, 909917, G, [(G, A)]) . 1576.94 [] False  
2 (1, 986963, C, [(C, T)]) . 398.06 [] False  
3 (1, 1563691, T, [(T, G)]) . 1090.75 [] False

Is there a way to get v as chr:start:ref:alt in the dataframe without having to reconstruct it?  
As this is the method of choice to uniquely identify a variant, it would make sense to make it available to pandas (as it is to export\_variants()).

---

<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:** [October 25, 2017, 4:12pm UTC](https://discuss.hail.is/t/keep-v-chr-pos-ref-alt-format-in-variants-table-to-pandas/340/2 "2017-10-25T16:12:17Z")

</div>

to\_pandas uses Spark dataframes as an intermediate, which don’t know about Hail specific objects (Variant, Genotype, etc). We’ll write a direct converter at some point which can keep these objects and which can probably go way faster. For now, map it to a str first:

`vds.variants_table().annotate('v = str(v)').to_pandas(expand=False)`
