keep y axis fixed to 2, csv automation
This commit is contained in:
@@ -2,6 +2,7 @@ import glob
|
||||
import pandas as pd
|
||||
import openpyxl
|
||||
import os
|
||||
from platform import system
|
||||
|
||||
rootdir = os.getcwd()
|
||||
|
||||
@@ -45,16 +46,19 @@ def consolidate(curdir):
|
||||
|
||||
outfile = rootdir + "/" + os.path.split(curdir)[1] + "_Merged.xlsx"
|
||||
|
||||
df_csv_append.to_excel(outfile, index=False)
|
||||
# df_csv_append.to_excel(outfile, sheet_name="merged_data", index=False)
|
||||
|
||||
# df_csv_append.to_csv("D8 Merged.csv", index=False)
|
||||
|
||||
writer = pd.ExcelWriter(outfile, engine = 'xlsxwriter')
|
||||
df_csv_append.to_excel(writer, sheet_name = 'x1')
|
||||
df_csv_append.to_excel(writer, sheet_name = 'x2')
|
||||
writer.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
for file in os.listdir(rootdir):
|
||||
d = os.path.join(rootdir, file)
|
||||
curdir = os.path.join(rootdir, file)
|
||||
if os.path.isdir(d):
|
||||
# print(d)
|
||||
# os.chdir(d)
|
||||
consolidate(d)
|
||||
consolidate(curdir)
|
||||
|
||||
Reference in New Issue
Block a user