added csv to excel converter

This commit is contained in:
Ankit 2022-10-02 12:30:52 +05:30
parent f78dedaf66
commit f5a4e01371
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# CSV to EXCEL
This is a simple script that lets you convert CSV files to Excel.
## Usage
* 2 packages required pandas and openpyxl
* Use `pip install pandas` and `pip install openpyxl`
* Add path to your csv file and output excel file WITH EXTENSTION `.csv` and `.xlsx`
* Run `python script.py`

View File

@ -0,0 +1,10 @@
import pandas as pd
def makeExcel():
df = pd.read_csv('Path to your CSV file.csv')
# index and header can be set True or False accoring to needs
df.to_excel('Path where save as Excel file.xlsx', index=False, header=True)
print('Converted Successfuly')
if __name__ == "__main__":
makeExcel()