Code
def display_heatmap(heatmap_data):
= heatmap_data.pivot(index='start_station_id', columns='end_station_id', values='trip_count')
heatmap_data return px.imshow(heatmap_data, title="Heatmap of Start/End stations in 2018", labels=dict(x="End Station", y="Start Station", color="Number of Trips"))
display_heatmap(heatmap_data_2018)