Speed is distance_km ÷ (minutes ÷ 60), in km per hour. Draw a scatter of distance_km (x) against speed (y), with one layer per partner type (alphabetical) labelled by partner, a legend and the y-axis label Speed (km/h).
import pandas as pd
deliveries = pd.DataFrame({
"order_id": list(range(1, 25)),
"city": ["Pune", "Delhi", "Mumbai", "Pune", "Delhi", "Mumbai"] * 4,
"day": ["Mon", "Mon", "Mon", "Tue", "Tue", "Tue", "Wed", "Wed", "Wed", "Thu", "Thu", "Thu",
"Fri", "Fri", "Fri", "Sat", "Sat", "Sat", "Sun", "Sun", "Sun", "Sat", "Sun", "Fri"],
"partner": ["Bike", "Bike", "Scooter", "Scooter", "Bike", "Bike", "Scooter", "Bike", "Bike", "Bike", "Scooter", "Scooter",
"Bike", "Scooter", "Bike", "Scooter", "Bike", "Scooter", "Bike", "Bike", "Scooter", "Bike", "Scooter", "Bike"],
"distance_km": [2.5, 6.0, 4.2, 3.1, 7.5, 5.0, 1.8, 8.2, 3.9, 2.2, 6.8, 4.8,
3.5, 5.5, 6.1, 2.9, 9.0, 4.4, 1.5, 7.1, 5.8, 3.3, 2.7, 6.4],
"minutes": [18, 35, 27, 21, 42, 31, 15, 47, 25, 17, 39, 30,
24, 33, 38, 20, 52, 28, 13, 41, 36, 23, 19, 37],
"bill": [320, 540, 410, 280, 760, 450, 190, 880, 360, 240, 620, 500,
350, 470, 590, 300, 940, 420, 160, 700, 560, 330, 260, 610],
"rating": [5, 4, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 4, 4, 3, 5, 2, 4, 5, 3, 4, 5, 5, 3],
})
import matplotlib.pyplot as pltDraw the chart. It is checked on what it shows: the data, the title and axis labels, the legend and the category names. Size and fonts don't matter.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.