if a file that has multiple columns, like
1 7 3 8 5 6
3 4 5 6 7 8
1 7 6 4 4 3
i want to read the first row and see if there numbers that are grater than 6. Then add that number to all the number in that column. For Example, for the second column i want to take 7 and add it to 7, 4, and 7. i can read the values and identify which number are grater than 6, but idk how i can add that number the specific column. Please Help!
import xlrd
import os
folder = "data"
dirList=os.listdir(path)
for file in dirList:
fullpath = os.path.join(folder,file)
if os.path.isfile(fullpath) == 1:
wb = xlrd.open_workbook(fullpath)
sh = wb.sheet_by_index(0)
for i in range(0, 1):
## print sh.row_values(i)
for values in sh.row_values(i):
if values > 6:
## print values
## print len(sh.col_values(0))