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
评论列表
文章目录