Issue
Is it possible to hide the index when displaying pandas DataFrames, so that only the column names appear at the top of the table?
This would need to work for both the html representation in ipython notebook and to_latex()
function (which I'm using with nbconvert
).
Solution
Set index=False
For ipython notebook:
print df.to_string(index=False)
For to_latex:
df.to_latex(index=False)
Answered By - waitingkuo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.