0

I have a pandas dataframe as shown below

enter image description here

I want to draw a scatterplot with this code

ax = sns.scatterplot(x="avg_PE_train",
                 y="rank",
                 hue="ARTCL_DESC",
                 palette="muted",
                 size = "sale_round",
                 data = top_seller_elast_pd)

but it gives me this error message

 AttributeError: 'decimal.Decimal' object has no attribute 'view'

What's wrong. Also, I want the name of each point to be shown besides it. How can I do that?

HHH
  • 6,085
  • 20
  • 92
  • 164
  • 2
    the code you provided seems to be working fine with the example data, is there any chance of a full error and traceback ? – dm2 Jul 28 '20 at 23:29
  • 1
    I find [this answer](https://stackoverflow.com/questions/54030855/attributeerror-str-object-has-no-attribute-view-in-seaborn-scatterplot) to be very helpful – r-beginners Jul 29 '20 at 07:02

0 Answers0