尝试将列表追加到csv时出错

问题描述 投票:0回答:1

我正在研究jupyter,并尝试将列表“ data_list”附加到csv,但控制台给我这个错误:

“ OSError:[Errno 95]操作不受支持”

with open('files/datasets/output/Personas_Mercantil_1.csv', 'a') as fd:

writer = csv.writer(fd, delimiter=';')
writer.writerow(data_list)

P.S .:我正在使用ec2 r5.2xlarge Amazon实例

python csv append jupyter
1个回答
0
投票

请尝试这个

with open('files/datasets/output/Personas_Mercantil_1.csv', 'a') as fd:
     writer = csv.writer(fd, delimiter=';')
     writer.writerow(data_list)
© www.soinside.com 2019 - 2024. All rights reserved.