Solving an Amazon Data Science Interview Question in Python Pandas (medium difficulty)

preview_player
Показать описание
Today's problem!

StrataScratch 9915 - Highest Cost Orders (Amazon | Medium Difficulty)

In this video, we solve another data science interview question on the StrataScratch platform using Python Pandas. In this problem we use functions such as merge, groupby, datetime filtering, and sorting.

If you enjoyed this video, don't forget to throw it a like and subscribe to not miss any future uploads!

-------------------------
Follow me on social media!

-------------------------

Code faster & smarter with Kite's free AI-powered coding assistant! (download link)

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Рекомендации по теме
Комментарии
Автор

Nice walk through, it's always interesting hearing people's thought processes. You really need to filter by the max costs and not just use head(2), which only works by coincidence. With other data sets this would fail! 🙂

MecchaKakkoi
Автор

Thank you for sharing your original walk-through. That shows us how you approach a problem, like how to search for syntax and debug. It is more natural and less intimidating. Very clear process. Thank you!

ax
Автор

dude this is awesome, as soon as I got to know you have second channel I immediately subscribed, you should make this as a casual series of solving interview problems

himeshkoli
Автор

Thanks for this. Its healthy to practice and avoid lossing the ability of managing pandas. I've left pandas for 1 week and when I returned, I was in a 'blank sheet' state. That's why I have like cheat sheets with fast examples of each pandas function (not all, but the most important) because you have to learn other stuff to like Django for example to make your codes interactive with people and give them some kind of use and learning other stuff and lefting practice on other stuff its kind of tricky but I think in some point, I'm gonna get use to it

LNMLucasMasiero
Автор

This is such an effective way to learn as i can watch you make those relatable errors and apply the thinking in a similar pace

shahadat.hussain
Автор

Thanks for this 🙌🏽 I’m currently going through a data Analytics boot camp and have been having trouble just understanding the process and what steps to take first when doing word problems like this.

EverythingData
Автор

Your videos are so smooth, thanks for sharing.

kasrayazdani
Автор

The question prompts are so ambiguous on this website! Makes it very difficult to get them the exact info that they want! I ran into the same problem as you did in not realizing they wanted us to multiply by the order quantity. Thanks for the explanation!

AndrewT
Автор

And once again super classwork... will wait for the next one!

jaydeepjoshi
Автор

Had you filtered out the orders data first before join, your solution would have been more optimised. As you already know that in reality order table is huge and putting a join on complete table would be a herculian task!

gauravpandeypgpm
Автор

I think using head(2) is not correct for output as the question meant that print the customers with the "highest" total order cost so basically for the final answer you need to first find out the max of the total_cost column and print only the customers whose total_cost equals the max(total_cost). The head(2) only worked because you saw the expected output but in interviews we won't get that. Overall very informative video👍

Truth___
Автор

is google searching such methods of pandas allowed during interview?

ayushbajpai
Автор

Thanks for the video. Why do we need to specify the first part of the date filter as greater or equal but not the second?

Lnd
Автор

why can't we filter out the data first base upon the specified date then apply the group by.. if you have large dataset it might improve the performance.. isn't it ?

CrazyFunCricket
Автор

very informative video keith, thank you for sharing your valuable knowledge with us. when will we expect new video from you?

sandipnalawade
Автор

Strongly against the unnecessary "merge" at the start. Using "map" is a lot more efficient for key vs value mapping, as in

pactofshadows
Автор

It's funny how at 10:15 I immediately knew it would be ascending = False (I was actually shouting...), but you went with reverse = True, probably because you work with so many things you are bound to get confused sometimes and I am focusing on only 1 thing right now, so I wish to be confused like this too lol

suryamgupta
Автор

Pulled off a quick one at the end lol.

fardinahsan
Автор

Commenting for the algorithm *thumbs up*

patrickdamour
Автор

Can u use Google during the interview??!!

procode