Idle and Pandas-Python -


i trying launch code have found ipython notebook (i add code :interactive(true)...) , problem when use "run module" idle launches "data.plot" loads , nothing happens. data.plot doesn't seem work.

thanks if have idea.

note: without "interactive(true)" box show "runtime error"

import pandas pd import matplotlib.pyplot plt matplotlib import interactive interactive(true)  # read data dataframe data = pd.read_csv('http://www-bcf.usc.edu/~gareth/isl/advertising.csv', index_col=0) print(data.head())  # print shape of dataframe print data.shape  # visualize relationship between features , response using scatterplots fig, axs = plt.subplots(1, 3, sharey=true) data.plot(kind='scatter', x='tv', y='sales', ax=axs[0], figsize=(16, 8)) data.plot(kind='scatter', x='radio', y='sales', ax=axs[1]) data.plot(kind='scatter', x='newspaper', y='sales', ax=axs[2]) 

try display(data.plot(params)). import try from ipython.core.display import display.

this worked me in ipython notebooks.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -