Mar-03-2020, 09:05 PM
This creates a dataframe, loops through and prints the values, and if the value is 6 it is modified to 100.
import pandas as pd df = pd.DataFrame(({1,2,3},{4,5,6},{7,8,9})) for row in range(3) : for col in range(3) : print(df.iloc[row,col]) if df.iloc[row,col] == 6 : df.iloc[row,col] = 100 df