Answer:
import pandas as pd
df = pd.read_csv("file_csv")
df.to_excel("file.xlsx", sheet_name = "name_of_sheet")
# or use: with df.ExcelWriter("file.xlsx", mode='a') as file,
#df.to_excel(file, sheet_name= "sheet name")
Step-by-step explanation:
This python source code uses the pandas package to read csv (comma separated values) file and converts it to an excel file (xlsx) using the read_csv and ExcelWriter methods respectively.