import pandas as pd
# create a sample DataFrame
df = pd.DataFrame({'A': [1, 2, 3],
'B': [4, 5, 6], 'C': [3, 5, 2]})
# define a function to find the max value column
def max_col(row):
return row.idxmax()
# apply the function to each row of the DataFrame
max_cols = df.apply(max_col, axis=1)
# count the occurrences of each column
max_counts = max_cols.value_counts()
# column with the highest row-wise max values
max_col = max_counts.idxmax()
print("Max Value Column: ", max_col)