AttributeError: 'DataFrame' object has no attribute 'append'
Issue #61
closed
I am on iphop v.1.10 installed through conda. When I run the command
iphop predict --fa_file vcontigs.fasta \
--db_dir /home/database/iphoh/Sept_2021_pub/ \
--out_dir host_predict \
-t 30 --no_qc
I get the following error:
Link matching genomes to representatives and filter out redundant / useless matches...
Filtering blast data
Traceback (most recent call last):
File "/home/miniconda3/envs/iphop/bin/iphop", line 10, in <module>
sys.exit(cli())
File "/home/miniconda3/envs/iphop/lib/python3.8/site-packages/iphop/iphop.py", line 121, in cli
args["func"](args)
File "/home/miniconda3/envs/iphop/lib/python3.8/site-packages/iphop/modules/master_predict.py", line 94, in main
dataprep.aggregate(args)
File "/home/miniconda3/envs/iphop/lib/python3.8/site-packages/iphop/modules/dataprep.py", line 40, in aggregate
store_filtered = filter_hits(args,store,store_filtered,host_info)
File "/home/miniconda3/envs/iphop/lib/python3.8/site-packages/iphop/modules/dataprep.py", line 213, in filter_hits
store_filtered = store_filtered.append(df) ## Append should work directly now that we have matched all column and names nicely
File "/home/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'append'
seems something to with the pandas package. My panadas version=1.3.2
Comments (4)
-
repo owner -
reporter You are right. The conda list shows pandas v.1.3.2 but Python is using v.2.0.1. Probably by mistake we installed two versions of pandas through conda and pip. After the removal of the pip version, the iphop is working fine.
Thanks
-
repo owner Glad that it worked !
Best,
Simon
-
repo owner - changed status to closed
Solved
- Log in to comment
Hi,
“'DataFrame' object has no attribute 'append'“ is an error that (should) only appear in pandas 2.0. Can you double-check that iPhoP is really running with pandas 1.3.2 ?