Попробуйте это:
import os
dir_path = './' # path to the required directory
def add_float(val, index, dat_file):
lines = []
with open(dat_file, 'r') as rd_file:
for line in rd_file:
line = line.strip().split()
line.insert(index, str(val))
lines.append(' '.join(line))
with open(dat_file, 'w') as wrt_file:
wrt_file.write('\n'.join(lines))
for file in filter(os.path.isfile, os.listdir(dir_path)):
add_float(1.00, 3, file) # here, 1.00 is the value to be inserted after the 3rd column