How to get Glue Interactive Session Notebook to show matplotlib plot?

0

Hello, does anyone know got to get matplotlib plot working in Glue Interactive Session Notebook (PySpark)? Thank you

hai
asked a year ago484 views
1 Answer
1
Accepted Answer

The following code works, both in a AWS Glue Notebook or in a jupyter notebook using interactive sessions. hope this helps,

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
AWS
EXPERT
answered a year 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