Blue Week Special Offer | Brighten your week!
days
hours
minutes
seconds

Exploring eBay Car Sales - Guided Project

Greetings Everyone!

https://app.dataquest.io/c/54/m/294/guided-project%3A-exploring-ebay-car-sales-data/8/storing-aggregate-data-in-a-dataframe

Project_Eploring eBay Car Sales.ipynb (119.3 KB)

Click here to view the jupyter notebook file in a new tab

read here:
generic feedback

additionally @ ‘IN 278’: (BTW rerun the cells so they start at 1 )
use groupby insted of loops(always avoid loops at all cost when it comes to going trough all dataframe, loops should be your last choice). Here’s a different approach to achieve your results, without a loop:

top20 = autos["brand"].unique()[:20]
autos_20 = autos[autos["brand"].isin(top20)]
autos_20.groupby('brand')['price'].mean()

Thanks man, really appreciate the feedback. I hadn’t come across the ‘groupby()’ method just yet but I will certainly be checking it out further to utilize in future projects.