如何让Glue Interactive Session Notebook显示matplotlib图形?

0

【以下的问题经过翻译处理】 大家好,有人知道在Glue Interactive Session Notebook(PySpark)中如何使用matplotlib绘图吗?谢谢。

profile picture
專家
已提問 5 個月前檢視次數 23 次
1 個回答
0

【以下的回答经过翻译处理】 以下代码在AWS Glue Notebook 或使用交互式会话的jupyter笔记本中均可运行。希望这可以帮助您。

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

profile picture
專家
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南