Search code examples
pythonjupyter-notebookhistogramoutliers

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


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


Solution

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