📜  to_csv 创建文件夹 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:53.370000             🧑  作者: Mango

代码示例2
import os

outname = 'name.csv'

outdir = './dir'
if not os.path.exists(outdir):
    os.mkdir(outdir)

fullname = os.path.join(outdir, outname)    

df.to_csv(fullname