0

While I was using seaborn in Python to plot a scatter plot, I encountered this error: TypeError: unhashable type: 'Series'. The function I called was

sd.scatterplot(x='Close',y='Open', data=df)

where 'Close' and 'Open' are the names of columns in the pandas dataframe. Both columns are of float64 type. I've never had this issue before, has something changed? How do I fix this?

  • Can you please include a couple example lines from your dataframe in the question? – BeRT2me Apr 12 '22 at 18:20
  • 4
    This question is difficult to answer without knowing the input data. Please edit your question after reading [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples). – Mr. T Apr 12 '22 at 18:21
  • The most important thing you forgot to define is `sd`. What is it? and why `df.plot.scatter(x='Close', y='Open')` doesn't work for you? – Quang Hoang Apr 12 '22 at 18:57

0 Answers0