I have a dataframe where I would like to find max value of each row between 1 and 5 values.
Condition 1 to 5: Columns -> A1, B1, C1, D1, E1, F1, G1, H1, J1
Find Max_Value: Columns -> A2, B2, C2, D2, E2, F2, G2, H2, J2
Max_Value (Column) is the expected output on the screenshot.
You may see the attached screenshot to understand the question better. Thanks in advance for your support!
import pandas as pd
df = pd.DataFrame({'Type': ['X', 'Y', 'Z'], 'ID': [1212, 2342, 2421],
'A1': [1, 1, 1], 'A2': [0.3, 0.004, 0.86], 'B1': [2, 1.5, 3],
'B2': [0.1, 0.8, 0.005], 'C1': [3, 2, 5], 'C2': [0.8, 0.2, 0.3],
'D1': [4, 2.5, 7], 'D2': [0.2, 0.4, 0.004], 'E1': [5, 3, 9],
'E2': [0.9, 0.005, 0.99], 'F1': [6, 3.5, 11], 'F2': [0.4, 0.3, 0.4],
'G1': [7, 5, 13], 'G2': [0.6, 0.85, 0.003], 'H1': [8, 4.5, 15],
'H2': [0.94, 0.088, 0.85], 'J1': [9, 5, 17], 'J2': [0.003, 0.0001,0.3]})
print(df)