I have a pandas dataframe like:
name a b c
jack -10 -6 -10
bill -6 -3 -5
ray -3 -12 -9
pew 4 -23 -2
shaun 12 3 2
mitch 3 5 2
How can i make a new dataframe which takes the first positive value from each respective columns(a,b,c) and divides all the values in that column with that selected first positive value of that column and store the result of division in place of all the values. The output should look like this
name a b c
jack -10/4 -6/3 -10/2
bill -6/4 -3/3 -5/2
ray -3/4 -12/3 -9/2
pew 4/4 -23/3 -2/2
shaun 12/4 3/3 2/2
mitch 3/4 5/3 6/2