Use vs to fetch files and export files using Python

topic description

I want to merge csv files, but I"ve been writing because of coding. How do you want to solve the problem?

related codes

import os,codecs
cwd=os.getcwd()
fout=codecs.open("output.csv","w",encoding="utf-8-sig")
for file in os.listdir(cwd+"/air"):
    fin=codecs.open("air/"+file,encoding="utf-8-sig")
    for i in fin:
        fout.write(i)

result

Traceback (most recent call last):
File "C:UsersVivisourcereposPythonApplication89PythonApplication89PythonApplication89.py", line 16, in < module >

for i in fin:

File "C:Program Files (x86) Microsoft Visual StudioSharedPython36_64libcodecs.py", line 713, in next

return next(self.reader)

File "C:Program Files (x86) Microsoft Visual StudioSharedPython36_64libcodecs.py", line 644, in next

line = self.readline()

File "C:Program Files (x86) Microsoft Visual StudioSharedPython36_64libcodecs.py", line 557, in readline

)
data = self.read(readsize, firstline=True)

File "C:Program Files (x86) Microsoft Visual StudioSharedPython36_64libcodecs.py", line 503, in read

)
newchars, decodedbytes = self.decode(data, self.errors)

File "C:Program Files (x86) Microsoft Visual StudioSharedPython36_64libencodingsutf_8_sig.py", line 117, in decode

)
return codecs.utf_8_decode(input, errors)

UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa4 in position 0: invalid start byte
Press any key to continue. . .

Jul.30,2021

encoding is solved when Big5

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40154-2c4de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40154-2c4de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?