Feat: add logging in join
This commit is contained in:
parent
7bf0c38883
commit
806227f202
@ -10,7 +10,9 @@ def join_excel(src, dest, file_pattern):
|
||||
logging.debug(f"Concatenate {filenames}")
|
||||
dfs = extract_dfs(filenames)
|
||||
joined_df = pd.concat(dfs)
|
||||
logging.debug(f"Writing joined excel to {dest}")
|
||||
joined_df.to_excel(dest, index=False)
|
||||
logging.debug(f"with {len(joined_df)} rows")
|
||||
|
||||
|
||||
def list_files(src, file_glob):
|
||||
@ -20,5 +22,8 @@ def list_files(src, file_glob):
|
||||
def extract_dfs(filenames):
|
||||
dfs = []
|
||||
for filename in filenames:
|
||||
dfs.append(pd.read_excel(filename))
|
||||
logging.debug(f"Extracting {filename}")
|
||||
df = pd.read_excel(filename)
|
||||
logging.debug(f"Found {len(df)} rows")
|
||||
dfs.append(df)
|
||||
return dfs
|
||||
|
Loading…
Reference in New Issue
Block a user