Taxa Bar Plot Error - Unhashable type: 'Float64Index'

Hello QIIME2 Community,

I have been trying to use QIIME to analyze some 16S data. I started with an OTU table and some representative sequences that had already been generated for those OTUs. After importing them as QIIME objects, I have been looking at the alpha and beta analysis as well as taxonomy.

However, I have been receiving an error when trying to build a barplot from the taxonomic data. The error log is below:

Traceback (most recent call last):
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/q2cli/”, line 218, in call
results = action(**arguments)
File “”, line 2, in barplot
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/qiime2/sdk/”, line 201, in callable_wrapper
output_types, provenance)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/qiime2/sdk/”, line 393, in callable_executor
ret_val = callable(output_dir=temp_dir, **view_args)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/q2_taxa/”, line 29, in barplot
collapsed_tables = _extract_to_level(taxonomy, table)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/q2_taxa/”, line 35, in _extract_to_level
collapsed_table = _collapse_table(table, taxonomy, level, max_obs_lvl)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/q2_taxa/”, line 25, in _collapse_table
return table.groupby(table.columns, axis=1).agg(sum)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/”, line 4416, in groupby
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/”, line 1699, in groupby
return klass(obj, by, **kwds)
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/”, line 392, in init
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/”, line 2677, in _get_grouper
if gpr in obj:
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/”, line 909, in contains
return key in self._info_axis
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexes/”, line 348, in contains
if super(Float64Index, self).contains(other):
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexes/”, line 1640, in contains
File “/home/blaine/miniconda3/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexes/”, line 1667, in hash
raise TypeError(“unhashable type: %r” % type(self).name)
TypeError: unhashable type: ‘Float64Index’

Thank you for your time! :slight_smile:

All the best,

Hi @bgfritz1,
Thanks for posting! To help diagnose this error, could you please post the exact command that causes this error and send me the files that you are using as input to this command? (the feature table and taxonomy)

Have these files caused any other errors or is this the first command you are running with them?

Hi Nicholas,

Thanks for the reply.

As I was looking back at the command that I ran:

qiime taxa barplot \
  --i-table table.qza \
  --i-taxonomy taxonomy.qza \
  --m-metadata-file metadata/metadata_reduced.csv \     #is really a tsv file, just labeled as csv 
  --o-visualization taxa-bar-plots.qzv 

I realized that I was inputting the wrong Feature Table! I then ran the command calling upon the correct feature table and everything worked fine :slight_smile:


@bgfritz1, I’m glad to hear it all worked out!

Please let us know (in a new thread) if any other issues come up.

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