python code to save data with multiple sheet in excel
writer2 = pd.ExcelWriter('mult_sheets_2.xlsx')
df_1.to_excel(writer2, sheet_name = 'df_1', index = False)
df_2.to_excel(writer2, sheet_name = 'df_2', index = False)
writer2.save()
python code to save data with multiple sheet in excel
writer2 = pd.ExcelWriter('mult_sheets_2.xlsx')
df_1.to_excel(writer2, sheet_name = 'df_1', index = False)
df_2.to_excel(writer2, sheet_name = 'df_2', index = False)
writer2.save()
python code to save data with multiple sheet in excel
import pandas as pd
import numpy as np
df_1 = pd.DataFrame(np.random.rand(20,10))
df_2 = pd.DataFrame(np.random.rand(10,1))
python code to save data with multiple sheet in excel
with pd.ExcelWriter('mult_sheets_1.xlsx') as writer1:
df_1.to_excel(writer1, sheet_name = 'df_1', index = False)
df_2.to_excel(writer1, sheet_name = 'df_2', index = False)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us