如何解决无法在 Arcgis notebook (GIS) 中运行 python 包
我正在尝试在 Arcgis 笔记本中运行 python 可视化包 (altair),但出现此错误:
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)
这是我的代码:
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'
)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。