“DF para sobresalir” Código de respuesta

DF para sobresalir

import pandas as pd
df.to_excel("File_Name.xlsx', index = False)
Sachin

Exportar un marco de datos a Excel Pandas

#Python, pandas
#To export a pandas dataframe into Excel

df.to_excel(r'Path where you want to store the exported excel file\File Name.xlsx', index = False)
Ahh the negotiatior

Pandas escribe a Excel

# Create a Pandas Excel writer using XlsxWriter as the engine.
writer = pd.ExcelWriter('LTD Report Data.xlsx', engine='xlsxwriter')

# Write each dataframe to a different worksheet.
seg_2019.to_excel(writer, sheet_name='Seg 2019', index = False)
seg_2020.to_excel(writer, sheet_name='Seg 2020', index = False)
seg_2021.to_excel(writer, sheet_name='Seg 2021', index = False)
seg_2022.to_excel(writer, sheet_name='Seg 2022', index = False)

# Close the Pandas Excel writer and output the Excel file.
writer.save()
Sumaia Parveen Shupti

Respuestas similares a “DF para sobresalir”

Preguntas similares a “DF para sobresalir”

Más respuestas relacionadas con “DF para sobresalir” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código