在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
