Error message 'Data frame name not defined' when plotting histogram in python

Question:

I want to plot a histogram for all numerical columns in my data frame. An error message keeps on coming up saying my data frame name (Cab_Data) is not defined.

I have installed and imported matplotlib as plt, I used the code below to plot the histograms
Cab_Data.hist()

It returns the error message
NameError: name ‘Cab_Data’ is not defined

Asked By: imhanlahimi wendy

||

Answers:

Could you upload the full code you have when creating histogram? To provide a bit more context.

Answered By: Matt Greenfield

Absolutely. Yup, you have to load the DataFrame in every time you load your instance of Python.

Answered By: Matt Greenfield