Data Analysis : Medical Data Visualiser

Hello All,
I am trying to solve the assignment 3 of data analysis with python.
Here I get stuck at grouping of data frame based on cardio, variable and value.
The error is ‘data has no object value counts’, however I am able to run exactly same code on the jupyter lab notebook.
So I please request you to help me with this problem.

It looks like you simply forgot to call the .groupby method in your code?
This is what I had in my code, but looks like you are doing it slightly differently with a ‘total’ column. If I remember correctly, this way added a column named ‘count’ that i renamed afterwards to ‘total’ to match what was needed for the exercise

df_cat = df_cat.groupby([‘cardio’, ‘variable’, ‘value’], as_index = False).value_counts()
df_cat.rename(columns={‘count’: ‘total’}, inplace = True)

Hi, Thank your reply, however incorporating your suggestions also lead exactly same error.

No images of code or errors, please. Text is searchable and readable. Also, you’ll need to provide a link to your repl for actual debugging.

This error is typical of using old dependencies in this project. You’ll find details in the many threads about the python data analysis projects and their dependencies in the forums. If you update the dependencies and still have the problem, post a link to your repl.

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