%matplotlib inline SyntaxError: invalid syntax


在ipython中运行自己写的.py文件

 

显示dataframe

from IPython.display import display, HTML

然后在代码中调用:

display(df)

对应的解决方案网站:http://stackoverflow.com/questions/26873127/show-dataframe-as-table-in-ipython-notebook

 

在代码中显示plot:

 

使用%matplotlib inline    

出现:SyntaxError: invalid syntax


from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'inline')

对应的解决方案网站:http://stackoverflow.com/questions/35595766/matplotlib-line-magic-causes-syntaxerror-in-python-script

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM