so I am basically not allowed to use any import or other libraries like pandas or groupby. and I have to categorize the data and sum up the corresponding values. The data is