How to keep only max value of row and convert other value to NA?
d = {'col1': [1, 2, 3], 'col2': [3, 4, 5],'col3': [6, 7, 8]}
df = pd.DataFrame(data=d)
df
expected output
d = {'col1': np.nan, 'col2': np.nan,'col3':[6, 7, 8]}
df = pd.DataFrame(data=d)
df