# Feature table importing

**URL:** <https://forum.qiime2.org/t/feature-table-importing/25194>\
**Category:** User Support\
**Tags:** artifact-api, feature-table\
**Created:** [January 11, 2023, 2:38pm UTC](https://forum.qiime2.org/t/feature-table-importing/25194 "2023-01-11T14:38:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kam](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kam](https://forum.qiime2.org/u/kam)\
**Post date:** [January 11, 2023, 2:38pm UTC](https://forum.qiime2.org/t/feature-table-importing/25194/1 "2023-01-11T14:38:11Z")

</div>

Hi!

I have a feature table I recived from collaborator, using Qiime1 to process the sequences.  
It looks like feature tables usually look, with first coulmn containing feature information and each coulmn is a sample with counts:

> taxatable = pd.read\_table("/table.tsv", index\_col = 0)

gives me a dataframe of all features as indexes and coulmns for samples.

Than, if I try to import it as a QIIME2 feature table:

> taxatable\_feature\_table = q2.Artifact.import\_data(type="FeatureTable[Frequency]", view=taxatable)

and summarize the results, I get a table of my features as samples, and samples as features. obviously calling

> transpose()

on the taxatable solves it, but from what I know my origial table looks like feature tables should be organised for QIIME2..

---

<div class="post-metadata">

**Author:** ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)\
**Post date:** [January 11, 2023, 2:50pm UTC](https://forum.qiime2.org/t/feature-table-importing/25194/2 "2023-01-11T14:50:48Z")

</div>

Hi @kam,

Another python API user! Whoo!

One of the delightfully weird tricks about the python API is that the pandas representation of a feature table uses samples as rows and features as columns, but the biom Table representation uses features as row and samples as columns.

QIIME 1 was based on a biom format exclusively with a biom export. My suspecion is the at the table was exported using the `biom convert` functionality which didn't do transposition.

So, yeah, transpose your table or convert the text (pandas) table to a biom.Table object before importing.

Best,  
Justine

---

<div class="post-metadata">

**Author:** ![kam](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kam](https://forum.qiime2.org/u/kam)\
**Post date:** [January 11, 2023, 2:58pm UTC](https://forum.qiime2.org/t/feature-table-importing/25194/3 "2023-01-11T14:58:36Z")

</div>

Thank you so much for the clarification

Working with Python API is sure confusing as a beginner but the ability to use concise code to work with artificats outside QIIME worth it..

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [February 11, 2023, 8:59pm UTC](https://forum.qiime2.org/t/feature-table-importing/25194/4 "2023-02-11T20:59:28Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
