DateFrame'tsod'がありますが、これをhtmlに変換します。
tsod.to_html()
これをファイルとして保存するにはどうすればよいですか?'.html'ファイルとして保存することをお勧めします。
with open('my_file.html', 'w') as fo:
fo.write(tsod.to_html())
または代わりにパンダを使用する
tsod.to_html(open('my_file.html', 'w'))
またはもう一度(@ andy-haydenに感謝)
with open('my_file.html', 'w') as fo:
tsod.to_html(fo)
現在のバージョンのパンダは正常にtsod.to_html('out.html')
動作します。
a=tsod.to_html()
save(a,'path')
動作します