I'm trying to run a python visualization package (Altair) in Arcgis notebook and I'm getting this error:
RuntimeError Traceback (most recent call last)
In [1]:
Line 17: color='z:Q'
RuntimeError: make_tuple(): unable to convert arguments to Python object (compile in debug mode for details)
Here is my code:
import altair as alt
import numpy as np
import pandas as pd
# Compute x^2 + y^2 across a 2D grid
x, y = np.meshgrid(range(-5, 5), range(-5, 5))
z = x ** 2 + y ** 2
# Convert this grid to columnar data expected by Altair
source = pd.DataFrame({'x': x.ravel(),
'y': y.ravel(),
'z': z.ravel()})
alt.Chart(source).mark_rect().encode(
x='x:O',
y='y:O',
color='z:Q'
)