Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'DataFrame' object has no attribute 'iteritems' #101

Open
zhongguozhiwang opened this issue Nov 12, 2023 · 6 comments
Open

Comments

@zhongguozhiwang
Copy link

Hi!
The following error occurs when I run the sample file, how should I solve it?
$ compass --data test_data/tsv_format/expression.tsv --num-processes 10 --species homo_sapiens Cache for model and media already built Evaluating Reaction Penalties... Traceback (most recent call last): File "/public/home/chenyu/miniconda3/envs/compass/bin/compass", line 8, in <module> sys.exit(entry()) File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/main.py", line 588, in entry penalties = eval_reaction_penalties(args['data'], args['model'], File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/compass/penalties.py", line 96, in eval_reaction_penalties reaction_penalties = eval_reaction_penalties_shared( File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/compass/penalties.py", line 158, in eval_reaction_penalties_shared for name, expression_data in expression.iteritems(): File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'iteritems'

@YzGLab
Copy link

YzGLab commented Nov 24, 2023

你可以用python3.7版本以下的。 3.8 3.9 会报错

@zhongguozhiwang
Copy link
Author

你可以用python3.7版本以下的。 3.8 3.9 会报错

谢谢

@naveena-ujagar
Copy link

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'"

What did you do to fix it?

@KunFang93
Copy link

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'"

What did you do to fix it?

Downgrade pandas to 1.5.3 works for me.

@DrSujuanWang
Copy link

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'"
What did you do to fix it?

Downgrade pandas to 1.5.3 works for me.

Hi there, I just came across the problem, so which python version and numpy did you use to solve it? thanks.

@giuliaelgarcia
Copy link

Hi all, I am also getting the same issue: "AttributeError: 'DataFrame' object has no attribute 'iteritems'. By downgrading pandas compass won't work at all anymore. I also tried the Spark solution (https://stackoverflow.com/questions/76404811/attributeerror-dataframe-object-has-no-attribute-iteritems) and again Compass won't run.
Does anyone know how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants