Error on Replit 2 Challenge (Data Analysis Python)

i was in 2 challenge of Python in this part (attachment)
but when i run, this error Appear (AttributeError: ‘DataFrame’ object has no attribute ‘value_counts’)
BUT, when i run in VSCODE notebook.ipynb the code runs very well

Help me please!

The error is on the line of the a=(df[[‘salary’,‘native-country’]].value_counts()[‘>50K’]/df[[‘salary’,‘native-country’]].value_counts()[‘<=50K’])*100
circled in red

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