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.
Rucha
May 5, 2020, 12:30pm
#2
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
July 18, 2020, 6:46am
#5
hey @Ezemonye_Omereji
Thanks for the credit! I didn’t know @otavios.s has been impersonating me all this time!
Just want to know, if this query of yours is now resolved or you still have doubts? Let us me know .
1 Like
Rucha
July 18, 2020, 12:31pm
#7
hey @otavios.s
There is still scope for improvement… keep following me, we will get there … who am I kidding!
Even better dude!
@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… at_impersonate
I wish!
No problems. I’m glad your question was answered.