3
A
回答
5
with open('my_file.html', 'w') as fo:
fo.write(tsod.to_html())
或交替使用熊猫
tsod.to_html(open('my_file.html', 'w'))
或再次(感谢@安迪·海登)
with open('my_file.html', 'w') as fo:
tsod.to_html(fo)
0
a=tsod.to_html()
save(a,'path')
将工作
+1
save()是什么?这不是一个python内建函数 - 提示,尝试添加一个'import'语句。 – danodonovan 2013-02-15 16:00:11
1
由于大熊猫的当前版本tsod.to_html('out.html')
工作正常。
相关问题
- 1. 熊猫to_html float_format
- 2. 大熊猫TO_HTML条件格式
- 3. 拯救Django FormWizard
- 4. 格式输出数据在熊猫to_html
- 5. 熊猫to_html()截断字符串内容
- 6. JSON文件大熊猫DF
- 7. 从Mysql2拯救::错误
- 8. 拯救了IO :: popen方法
- 9. 如何“拯救与编码”
- 10. 大熊猫条件()
- 11. 大熊猫功能操作
- 12. 通过文件循环大熊猫
- 13. 格式化大熊猫.txt文件
- 14. 熊猫 - 拆分大型excel文件
- 15. 将大数据文件导入熊猫
- 16. 熊猫适用于大型csv文件
- 17. 导入在大熊猫一个CSV文件导入到数据帧大熊猫
- 18. 熊猫to_html:添加属性到表标记
- 19. 格式化与熊猫DataFrame中的to_html相关的索引
- 20. 事件研究大熊猫
- 21. GROUPBY与大熊猫条件
- 22. 与大熊猫
- 23. 熊猫大CSV
- 24. 在大熊猫
- 25. 在大熊猫
- 26. 大熊猫
- 27. 大熊猫天
- 28. 大熊猫
- 29. 在大熊猫
- 30. 在大熊猫
我不认为'tsod.to_html('my_file.html')'会起作用。 'to_html'不接受字符串,它接受它可以写入的内容,无论是打开的文件还是一个StringIO缓冲区(它寻找'.write()')。不过,你可以使用'tsod.to_html(fo)'。 – DSM 2013-02-15 15:42:41
thnx,从其他类中猜测... – danodonovan 2013-02-15 15:44:17
a = tsod.to_html()保存(a,路径)将工作 – wuwucat 2013-02-15 15:52:55