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?
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?
Share Improve this question edited Feb 6 at 12:52 Daraan 3,7907 gold badges22 silver badges45 bronze badges asked Feb 6 at 11:54 ZERO_BRAINZERO_BRAIN 134 bronze badges 3- 3 Possible duplicates: A, B If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. – Daraan Commented Feb 6 at 12:49
- 3 If you got a warning please state which one you are getting. – Daraan Commented Feb 6 at 12:50
- This question is similar to: How to fix: TypeError: relplot() got multiple values for argument 'x' when plottling a line plot with seaborn. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. – dimakin Commented Feb 6 at 20:33
1 Answer
Reset to default 1Do not add data=data
in the arguments if data
passed as the first argument is a DataFrame
(df
).