I'm trying to produce a bar chart to show the percentage of "Male","Female", and "different identity". So, I would like to have Male, Female, and Different Identity appear on the x axis and the percentage on the y axis.
This is my current code which I sourced from somewhere else
sns.barplot(x=ds.Gender, y=x, data = ds, estimator=lambda x: len(x) / len(ds) *100)
Currently, I get the output
"Neither the x nor y variable appears to be numeric."
I've tried to make the 'y' variable something numeric, but I have failed to do so. I've looked at countless other questions but couldn't implement them.
Any help would be much appreciated.