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

0

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

profile picture
EXPERT
asked 5 months ago23 views
1 Answer
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
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions