I have a excel file that looks like this:
1984 1 1
1985 1 1
I want to change all of the values in column 2 to 0 but I am not sure how to loop through rows.
I have tried:
import openpyxl
wb=openpyxl.load_workbook(r'C:\file.xlsx')
ws=wb['Sheet1']
for row in ws:
row = [x.replace('1', '0') for x in row]
but that must not be how you loop through rows.
my desired out put is:
1984 0 1
1985 0 1