1.自制配置文件 sweetviz.ini
2.核心改动:use_cjk_font = 1
3.在python中读取配置文件 sv.configer.read("sweetviz.ini")
配置文件
[General]
use_cjk_font = 1
association_min_to_bold = 0.1
[Type_Detection]
; Numeric columns will be considered CATEGORICAL if fewer than this many distinct
max_numeric_distinct_to_be_categorical = 10
; Text columns will be considered TEXT if more than this many distinct (CATEGORICAL otherwise)
max_text_distinct_to_be_categorical = 101
; Text columns will be considered TEXT if more than this fraction are distinct
max_text_fraction_distinct_to_be_categorical = 0.33
[Processing]
association_auto_threshold = 200
[Graphs]
num_summary_graph_width = 2.9
cat_summary_graph_width = 5.

本文介绍了如何解决sweetviz库在显示中文时出现乱码的简单方法,通过创建并修改配置文件sweetviz.ini,设置use_cjk_font为1,然后在Python中读取该配置文件,可以成功显示中文。
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



