ZERO_BRAIN
ZERO_BRAIN

Reputation: 13

Why am I getting a TypeError with sns.pairplot in my Diabetes Prediction Project, and should I suppress warnings?

GeeksforGeeks has many project to practice and one of them is this tutorial on a diabetes dataset

In the tutorial, they provide this code that works for them but not for me

sns.pairplot(data, hue='Outcome' , data = data) 
plt.show()

TypeError: pairplot() got multiple values for argument 'data'

ChatGPT suggested this solution, that only displays a warning on my device:

sns.pairplot(data, hue='Outcome')
plt.show()

Should I suppress the warnings?

Upvotes: 0

Views: 48

Answers (1)

Akshit Gulyan
Akshit Gulyan

Reputation: 71

Do not add data=data in the arguments if data passed as the first argument is a DataFrame (df).

Upvotes: 1

Related Questions