在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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-17
  • 2021-11-23
  • 2022-01-03
  • 2021-12-28
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-09-10
相关资源
相似解决方案