In this video, we will explore different ranking methods in Python for data analysis. We start with a simple exercise from Airbnb where we rank guests based on their ages in descending order. Then, we discuss the different ways to handle ties in ranking, including the default option that gives the same rank to tie groups under the average method, and the minimum and maximum methods that use the minimum and maximum rank for tie groups, respectively. Finally, we introduce the dense ranking method that assigns consecutive ranks with no gaps regardless of how many entities are tied for a rank. We apply these methods to different problems, including ranking cities by the most five-star businesses and hosts by the most number of beds listed, and compare the results of each method.
👉 Check out next video for more:
Data Ranking: Python Pandas and SQL Equivalents [Part 2]: • Data Ranking: Python Pandas and SQL E...
🧑💻 Go to the questions through the links below and follow along with us:
📌 Question1: https://platform.stratascratch.com/co...
📌 Question 2: https://platform.stratascratch.com/co...
📌 Question 3: https://platform.stratascratch.com/co...
📌 Question 4: https://platform.stratascratch.com/co...
______________________________________________________________________
👉 Subscribe to my channel: https://bit.ly/2GsFxmA
👉 Playlist for more data science interview questions and answers: https://bit.ly/3jifw81
👉 Playlist for data science interview tips: https://bit.ly/2G5hNoJ
👉 Playlist for data science projects: https://bit.ly/StrataScratchProjectsY...
👉 Practice more real data science interview questions: https://platform.stratascratch.com/co...
______________________________________________________________________
Timeline:
Intro: (0:00)
Rank guests based on their ages (0:23)
Find the top 5 cities with the most 5 star businesses (2:09)
Ranking Hosts by beds (4:28)
Activity Rank (6:31)
Conclusion: (8:10)
______________________________________________________________________
About The Platform:
I'm using StrataScratch (https://platform.stratascratch.com/co..., a platform that allows you to practice real data science interview questions. There are over 1000+ interview questions that cover coding (SQL and python), statistics, probability, product sense, and business cases.
So, if you want more interview practice with real data science interview questions, visit https://platform.stratascratch.com/co.... All questions are free and you can even execute SQL and python code in the IDE, but if you want to check out the solutions from me or from other users, you can use ss15 for a 15% discount on the premium plans.
______________________________________________________________________
Contact:
If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at [email protected]
_______________________________________________________________________
#pandaspythontutorial #pythondatascience #pythoninterviewquestion