I have this dataframe: I would like to use explode function for column “A” and then to keep right and fair proportion for each exploded row in case with column “B” . So the result should look like this: Would this be possible with the explode function? I would manage to come to this result with for row in data.itertuples():