Python BoxPlot Error - 'Series' object has no attribute 'boxplot'

bos*_*ler 2 python matplotlib

I'm trying to create a boxplot and I'm running into this error - 'Series' object has no attribute 'boxplot'

Here is my current code:

    fig = plt.figure(figsize=(8,6))
ax = fig.gca()
frame['ArrDelay'].boxplot(ax = ax)
ax.set_title('BoxPlot of ArrDelay')
ax.set_xlabel('ArrDelay')
ax.set_ylabel('Delay Time')
Run Code Online (Sandbox Code Playgroud)

Any suggestions?

pas*_*ask 5

Assuming you are using a pandas DataFrame

fig = plt.figure(figsize=(8,6))
ax = fig.gca()
frame.boxplot(column='ArrDelay', ax=ax)
# frame['ArrDelay'].plot.box(ax=ax) # Alternative
ax.set_title('BoxPlot of ArrDelay')
ax.set_xlabel('ArrDelay')
ax.set_ylabel('Delay Time')
Run Code Online (Sandbox Code Playgroud)