I'm a newbie to pandas dataframe, and I wanted to apply a function to each column so that it computes for each element x, x/max of column.
I referenced this question, but am having trouble accessing the maximum of each column. Thanks in advance Pandas DataFrame: apply function to all columns
Input:
A B C D
0 8 3 5 8
1 9 4 0 4
2 5 4 3 8
3 4 8 5 1
Output:
A B C D
0 8/9 3/8 5/5 8/8
1 9/9 4/8 0/5 4/8
2 5/9 4/8 3/5 8/8
3 4/9 8/8 5/5 1/8
8/9?