我在jupyter笔记本中保存了一个名为df
的数据框,并希望将其导出到我的桌面上的csv文件中。
df.to_csv('data.csv')
将 Pandas 数据框保存为 CSV 文件。df.to_csv("<path to desktop and filename>")
# If you just use file name then it will save CSV file in working directory.
# Example path : C:/Users/<>/Desktop/<file name>.csv
如果您想了解更多信息,可以访问官方文档。