I have dataframe with more than 100 features, half of it are numeric columns. I want to generate new features by dividing columns by each other. Is there an easy way to do it? Example:
df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))
A B C D
0 6 53 75 65
1 26 93 5 0
2 48 5 13 95
3 8 93 50 41
4 62 32 99 5
5 66 55 92 61
6 72 77 52 13
7 40 13 94 90
8 48 22 41 17
9 11 42 76 9
I would like to get all possible combinations except dividing column by itself. Like this A/B, B/A, C/D, D/C, A/D...