Guided Project: Exploring Ebay Car Sales

https://app.dataquest.io/m/294/guided-project%3A-exploring-ebay-car-sales-data/4/exploring-the-odometer-and-price-columns

Hi, here is my code:

autos["price"] = (autos["price"]
                          .str.replace("$","")
                          .str.replace(",","")
                          .astype(float)
                          )

autos["price"].describe().sort_index(ascending=False)
autos["price"']=autos[autos["price"].between(1,35000)]
autos['price'].describe()


In the first “describe” I check that the series “autos” has the type float, but after removing outliers, when I use the method “describe” it turns to object type and it has a date in the top value.

hey @silvinajusid

Welcome to DQ Community!

this code has two issues - one I assume is typo - there’s an ' quote in price on LHS.
two - why are you assigning a dataframe to a column?

don’t you think it should be autos = autos[autos["price"]...... ?

2 Likes

@Rucha Could you please explain further on how to read the outliers from the following?

>  autos['price_usd'].describe().value_counts()

@Rucha Your reply here saved me. Thank you.

Guided Project: Exploring Ebay Car Sales Data [Removing outliers from price and odometer columns]

1 Like

hey @ezems123

Thanks for the credit! I didn’t know @otavios.s has been impersonating me all this time! :stuck_out_tongue_closed_eyes:

Just want to know, if this query of yours is now resolved or you still have doubts? Let us me know :wink:.

1 Like

:joy: :joy: :joy: :joy: :joy:
Hope I did a good job!

1 Like

hey @otavios.s

There is still scope for improvement… keep following me, we will get there :rofl: … who am I kidding!
Even better dude! :clap:

@Rucha @otavios.s Oh! my bad! I think I mixed the mentions. All good, both responses served me well and stepped forward with the guided project…Thank you to you all… :rofl: :rofl: at_impersonate

:joy: :joy: I wish!

No problems. I’m glad your question was answered.