Creating Excel Sheets with Python!
import pandas as pd
#Enter your data, example format:
data = {
'Name': ['Alice', 'Bob', 'John'],
'Age': [25,30,45]
}
#Converts our data to a DataFrame
df = pd.DataFrame(data)
#Export to excel -> Will create the file in your Home directory
#You can change your Path to whatever you wish
df.to_excel("/home/gr1ff1n/Desktop/excel-sheet1.xlsx", index=False)
#Debugging & Success message
print("Excel file created!")
Last updated