python - 如何在 Google Colaboratory 中使用 IBM python 模块“pixiedust”?
问题描述
我对 IBM 开发的调试和可视化库 pixiedust 很着迷,想在 google colab 上试用一下。
我做了以下工作:
!pip install pixiedust
# matplotlib, seaborn, jinja2 are already installed in gcolab.
显示图表不起作用
import pixiedust
df = pixiedust.sampleData() # this shows the dataframe
display(df) # This does not do anything.
调试也不起作用
import pixiedust
# Next cell
%%pixie_debugger
import random
def find_max (values):
max = 0
for val in values:
if val > max:
max = val
return max
find_max(random.sample(range(100), 10))
# This gives nothing.
是否可以在 Google Colab 中使用 pixiedust,或者它只能在 IMB 云中使用?
解决方案
@astro123 可能有点晚了,但也许其他人也和我一样。所以这是我的解决方案。如pixiedust 安装指南中所述,在https://pixiedust.github.io/pixiedust/install.html ,您必须检查您是否有一个带有 pixiedust 的 jupyter 内核。在 colab 中运行
!jupyter pixiedust list
如您所见,默认情况下它没有带有 pixiedust 的内核,只需通过以下方式安装即可
` !jupyter pixiedust install`
然后您可以在主面板上选择使用 pixiedust 内核运行。它现在应该可以工作了,但是随着协作的不断发展,没有简单的演练。
问候
推荐阅读
- angular - Angular Universal - 排除路线
- r - Find the complement with the `subset` function in R
- javascript - 将数据格式化为文本,同时在数据表中向 excel 报告,但不工作
- java - 具有依赖注入错误的生产者/消费者模式
- sql - 有多少种方法可以生成将 varchar 转换为不会被 ISNUMERIC() 捕获的数字的错误?
- ssrs-2008 - 如何在 ssrs 单参数中创建父子层次结构
- java - 如何使用 FileSystem.getPath() 作为 (File-)Writer 的目标?
- python - BeautifulSoup(html) 返回字母之间有空格的文本
- angular - 计算 FormGroup 字段时超出最大调用堆栈大小
- c# - 使用 C# 的 Mailjet Api