I got a dataframe has the format below using "pivot_longer" function:
df1 = Dept. qtr bud_or_act amount <