This a a portion of a larger code.
I have a directory with 100's of .log files that I need to convert to .xlsx files one at a time. I wrote this code;
import csv
import glob
import pandas as pd
df = pd.read_csv('input.log', delimiter=r"\s+", header=None, names=list(range(20)))
df.to_excel('input.xlsx', 'Sheet1')
Which works for a single file. What do I need to add to have it look through the directory and convert each file regardless of how many there are?