Question: Part 2 - Rank stations by usage In this part of the lab, you will complete the rank _ station _ usage function. This function

Part 2- Rank stations by usage
In this part of the lab, you will complete the rank_station_usage function. This function will
analyze bikeshare data within a specific year and quarter to determine the stations that were used
most frequently within that year and quarter. The function takes the following inputs:
bikeshare_df - A pandas DataFrame containing bikeshare data formatted like the
DataFrame returned by the create_bikeshare_df function
year - an int specifying the year we want to analyze
quarter - an int specifying the quarter we want to analyze
The function should return a DataFrame that is indexed by station names and has the following
columns:
DOCUMENT UPDATED April 9,2024 TO REFLECT THAT PART 1 IS OPTIONAL AND FOR BONUS
MARKS
The returned DataFrame's rows should be sorted in descending order according to the
combined_departure_return_count values (i.e., the station with the highest total usage
should be in the first row of the returned DataFrame).
Example usage
Part 2 - Rank stations by usage In this part of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!