Advertisement

Python tips: 忽略警告;多行显示;矢量图设置;正常显示中文标签和负号

阅读量:
复制代码
    import warnings
    import pandas as pd
    import matplotlib.pyplot as plt
    
    # 忽略警告
    warnings.filterwarnings('ignore')
    
    # 多行显示
    from IPython.core.interactiveshell import InteractiveShell
    InteractiveShell.ast_node_interactivity = "all"
    
    # 矢量图设置
    %config InlineBackend.figure_format='svg'
    
    # 画图显示中文标签
    plt.rcParams['font.sans-serif']=['SimHei']
    
    # 用来正常显示负号
    plt.rcParams['axes.unicode_minus']=False 
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      

全部评论 (0)

还没有任何评论哟~