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

hai
已提问 1 年前526 查看次数
1 回答
1
已接受的回答

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
专家
已回答 1 年前

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

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

回答问题的准则