0
点赞
收藏
分享

微信扫一扫

CSV__01--使用python实现对csv插入一行标题栏

使用python实现对csv插入一行标题栏

path = 'demo.csv'
index = 'A,B,C'
with open(path, 'r+', encoding='utf-8') as f:
    content = f.read()
    f.seek(0, 0)
    f.write(index + '\n' + content)
举报

相关推荐

0 条评论