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

0

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

profile picture
ESPECIALISTA
feita há 5 meses23 visualizações
1 Resposta
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
ESPECIALISTA
respondido há 5 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas