Using Python 3.7, pandas 1.1.4
MRE:
d = {1:"A", 2:"B", 3:"C"} df = pd.DataFrame({"group":[0,1,2,3,4,5,6,7,8,9,