Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python script to write dataframe on excel

import pandas as pd
import openpyxl

df = pd.DataFrame([[11, 21, 31], [12, 22, 32], [31, 32, 33]],
                  index=['one', 'two', 'three'], columns=['a', 'b', 'c'])

print(df)
#         a   b   c
# one    11  21  31
# two    12  22  32
# three  31  32  33
Source by pythonbasics.org #
 
PREVIOUS NEXT
Tagged: #python #script #write #dataframe #excel
ADD COMMENT
Topic
Name
8+7 =