Python. I m going to use a pandas Locate the column name from column 1. Locate the column name in the text entered in column 0 and enter the number as a number.
import pandas as pd
data = [[ EA ,0,0,0], [ col2,col2 , 0, 0,0], [ col3 , 0,0,0]] df_input = pd.DataFrame(data, columns=[0, EA , col2 , col3 ]) df_input
data = [[ EA ,1,0,0], [ col2,col2 , 0, 2,0], [ col3 , 0,0,1]] df_output = pd.DataFrame(data, columns=[0, EA , col2 , col3 ]) df_output
>