Relative Content

Tag Archive for pythonpandasdataframeopenpyxl

Why are no new sheets created although the code manages to run?

#Load master worksheet to paste the newly splitted fixings master_file = “output.xlsm” master_si = load_workbook(master_file, keep_vba=True) #Load nicer_ws, then read to become data frame !!! nicer_split = pd.read_excel(old_murex, sheet_name=’nicer_WS’) print(‘Initial nicer_split: ‘) print(nicer_split) # Ensure ‘Dates’ is a string (or datetime if preferred) nicer_split[‘Dates’] = nicer_split[‘Dates’].astype(str) # Split the DataFrame into multiple DataFrames based on […]