跳至内容

How to get Glue Interactive Session Notebook to show matplotlib plot?

0

Hello, does anyone know got to get matplotlib plot working in Glue Interactive Session Notebook (PySpark)? Thank you

已提问 3 年前1479 查看次数

1 回答
2
已接受的回答

The following code works, both in a AWS Glue Notebook or in a jupyter notebook using interactive sessions. hope this helps,

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

plt.clf()
df=sqlDF.toPandas()
plt.bar(df.DOLocationID, df.sum_total_amount)
%matplot plt
AWS
专家

已回答 3 年前

专家

已审核 2 年前

专家

已审核 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。