You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
CollectionsLetters/collections_to_execl.py

19 lines
524 B

import pandas as pd
import os
all_frames = []
for f in os.listdir("/config/workspace/LEAF/Collections/NEWProcess"):
num = f.split(".")[1]
date = f"{num[0:4]}/{num[4:6]}/{num[6:8]}"
cl_df = pd.read_csv(f"/config/workspace/LEAF/Collections/NEWProcess/{f}")
date_list = [date for _ in range(0, len(cl_df.index))]
cl_df["CollectionsFileDate"] = date_list
all_frames.append(cl_df)
combined = pd.concat(all_frames)
print(combined)
combined.to_excel("NewProcessForwardTest.xlsx", index=False)