准備工作 安裝第三方庫: pip install autoviz xlrd wordcloud
我安裝的 autoviz 是 0.0.84 xlrd 是 1.2.0 wordcloud 是 1.8.1
如果你有數據集,如 csv 文件,可以用你自己的。 我這里使用的是 seaborn-data 數據集
Github :https://github.com/mwaskom/seaborn-data
我的在導入運行時,出現了 get_ipython().magic('matplotlib inline') 問題 將 if verbose <= 1: 和 get_ipython().magic('matplotlib inline') 的注釋去掉
(我的是修改了兩處 225行和 811行,我的 autoviz 是 0.0.84 版本) if verbose <= 1: # ipython inline magic shouldn't be needed because all plots are # being displayed with plt.show() calls get_ipython().magic('matplotlib inline')
from autoviz.AutoViz_Class import AutoViz_Class AV = AutoViz_Class() path = 'seaborn-data/' df = AV.AutoViz(path + 'iris.csv')
Shape of your Data Set loaded: (150, 5) ############## C L A S S I F Y I N G V A R I A B L E S #################### Classifying variables in data set... Number of Numeric Columns = 4 Number of Integer-Categorical Columns = 0 Number of String-Categorical Columns = 1 Number of Factor-Categorical Columns = 0 Number of String-Boolean Columns = 0 Number of Numeric-Boolean Columns = 0 Number of Discrete String Columns = 0 Number of NLP String Columns = 0 Number of Date Time Columns = 0 Number of ID Columns = 0 Number of Columns to Delete = 0 5 Predictors classified... This does not include the Target column(s) No variables removed since no ID or low-information variables found in data set Number of All Scatter Plots = 10
Time to run AutoViz (in seconds) = 6.461 ###################### VISUALIZATION Completed ########################