I want to be able to variably change a column value based on the value of the first column.
Say I have a dataframe as follows:
col_ind col_1 col_2 col_3
3 a b c
2 d e f
1 g h i
I effectively want to do
df.loc[:, df.columns[-df['col_ind']:]] = np.nan
Which would result in:
col_ind col_1 col_2 col_3
3 nan nan nan
2 d nan nan
1 g h nan