text_plain_output_1.png
import numpy as np

college_categories = ['IIM A', 'IIM B', 'IIM C', 'IIM L', 'IIM I', 'IIM K']
time_periods = [2019, 2020, 2021, 2022]
avg_sal_data = np.array([[12, 10, 12, 13], [11, 9, 10, 12], [11, 8, 9, 10], [10, 7, 8, 9], [9, 8, 7, 8], [8, 7, 8, 9]])

ranks = np.argsort(avg_sal_data, axis=0)[::-1]
rank_data = np.zeros_like(avg_sal_data)
for i in range(len(time_periods)):
    rank_data[:, i] = ranks[:, i] + 1
rank_data