我有以下变量
num1 = '1'
num2 = '2'
num3 = '3'
num4 = '4'
num5 = '5'
num6 = '6'
num7 = '7'
num8 = '8'
使用jupyter笔记本,我想写csv,左边第一行有4个值,左边第二行有4个值,没有标题和索引
在documentation中,有以下示例:
df = pd.DataFrame({'name': ['Raphael', 'Donatello'],
'mask': ['red', 'purple'],
'weapon': ['sai', 'bo staff']})
df.to_csv(index=False)
我不知道如何修改这个部分
{'name': ['Raphael', 'Donatello'],
'mask': ['red', 'purple'],
'weapon': ['sai', 'bo staff']}
适合我的
我会在你编辑完这篇文章后修复它
相关问题 更多 >
编程相关推荐