Apply CSS class to Pandas DataFrame using to_html

前端 未结 4 575
执笔经年
执笔经年 2020-11-28 21:46

I\'m having trouble applying \"classes\" argument with Pandas \"to_html\" method to style a DataFrame.

\"classes : str or list or tuple, default None CSS class(es) t

4条回答
  •  自闭症患者
    2020-11-28 22:20

    Essentially, the pandas.to_html() just exports a plain HTML table. You can insert the table wherever you want in the body and control the style via CSS in the style section.

    
    
    
    
    
    {
      pandas.to_html()
    }
    
    
    

提交回复
热议问题