3

For some reason I am getting the below when I try and plot something with Vincent:

<IPython.core.display.HTML at 0x10db19650>
<IPython.core.display.Javascript at 0x10db19d50>

Here's the code:

import pandas as pd
import vincent

data = pd.read_csv('kd.csv')
pd.set_option('display.max_columns', None)

df = pd.DataFrame(data=[data['Age'], data['FG'], data['FGA'], data['3P'], data['3PA']])
df = df.T

df[['FG', 'FGA', '3P', '3PA']] = df[['FG', 'FGA', '3P', '3PA']].astype(float)

line = vincent.Line(df)

line.display()

This happens in IPython and Ipython Notebook. Any idea why?

VividD
  • 10,456
  • 6
  • 64
  • 111
metersk
  • 11,803
  • 21
  • 63
  • 100

1 Answers1

2

Not sure if you found answer yet but it's a simple solution.

import vincent as v
v.core.initialize_notebook()

From there your plots should render correctly within Ipython notebook. A call to line.display() is unnecessary.

BCR
  • 960
  • 11
  • 27