I am trying to save defined in Python Pandas Data Frame as HTML page. In addition i would like to make this table saved as HTML table ability to be filtered by value of any column. Can you please provide possible solution? At the final this should be table saved as HTML page. I would like to incorporate this code in my Python code. Thank you
解决方案
Example:
>>> import numpy as np
>>> from pandas import *
>>> df = DataFrame({'foo1' : np.random.randn(2),
'foo2' : np.random.randn(2)})
>>> df.to_html('filename.html')
This will save the following html to filename.html.
Output:
foo1foo2
0-0.223430-0.90446510.3173161.321537