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

0

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

profile picture
EXPERTO
preguntada hace 5 meses23 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace 5 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas