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

0

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

profile picture
EXPERTE
gefragt vor 5 Monaten23 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen