最佳答案
                                        
                                                                        
                                当在脚本(而不是 IPython)中使用这个命令时,什么都不会发生,也就是说,绘图窗口不会出现:
import numpy as np
import pandas as pd
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
ts.plot()
Even when adding time.sleep(5), there is still nothing. Why?
有办法吗,而不必手动调用 matplotlib?
 
                                
                             
                                
                             
                                
                            