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 ago805 views
1 Answer
2
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
profile picture
EXPERT
reviewed 3 months ago
profile picture
EXPERT
reviewed 4 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