Skip to content

Commit 4add02f

Browse files
Create UploadAsCSV.py
1 parent d076a0e commit 4add02f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

UploadAsCSV.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pandas as pd
2+
3+
# Create a dictionary with the data to be uploaded
4+
data = {'Name': ['John', 'Alice', 'Bob', 'Jane'], 'Age': [25, 28, 30, 35], 'Salary': [50000, 60000, 70000, 80000]}
5+
6+
# Create a Pandas dataframe from the dictionary
7+
df = pd.DataFrame(data)
8+
9+
# Write the dataframe to an Excel file with columns as headers
10+
df.to_excel('output.xlsx', index=False)

0 commit comments

Comments
 (0)