I have to create a dataframe from a file that contains some columns repeated and their values split as it follows:

As you can see c1 for example is split into 3 parts or c2 into 2
What i want to get it is something like:

I know that i can merge the columns by:
df.sum(index=1) or df.max(index=1)
but don't know how to specify that I want to do it with specific columns.
Another possibility could be to create dataframes with only the repeated columns, apply either sum or max and then merge everything.
But I was wondering if there is something less "ugly".