html_styles.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:table-compositor 作者: InvestmentSystems 项目源码 文件源码
def data_style_func(df):
        '''
        Default value that can be used as callback for data_style_func

        Args:
            df: the dataframe that will be used to build the presentation model

        Returns:
            a function table takes idx, col as arguments and returns a dictionary of html style attributes
        '''
        def _style_func(r, c):
            if isinstance(df.at[r,c], (np.int_, np.float, np.uint)):
                return td_style_to_str(default_numeric_td_style)
            return td_style_to_str(default_td_style)
        return _style_func
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号