I am trying to convert all csv files of a folder to xlsx and using below code.
import glob
import csv
import pandas as pd
files = glob.glob('D:\cf111\*.csv')
for k in files:
df = pd.read_csv(k)
df.to_excel("abc.xlsx")
The code is generating the below error.
utf-8' codec can't decode byte 0x92 in position 11: invalid start byte
I cant sort out, how to resolve this error.