Answers for "how to read csv file as a excel sheet in python"

3

how to convert csv to excel in python

import pandas as pd

data = pd.read_csv("k.csv")

data.to_excel("new_file.xlsx", index=None, header=True)
Posted by: Guest on February-01-2021
0

python openpyxl csv to excel

import pandas as pd

read_file = pd.read_csv (r'Path where the CSV file is storedFile name.csv')
read_file.to_excel (r'Path to store the Excel fileFile name.xlsx', index = None, header=True)
Posted by: Guest on March-24-2021

Code answers related to "how to read csv file as a excel sheet in python"

Python Answers by Framework

Browse Popular Code Answers by Language