[https://www.codecademy.com/practice/projects/roller-coaster](Project Link)

While writing the function for the histogram for this code challenge, I got the following error:

```
File "/usr/local/lib/python3.6/dist-packages/numpy/lib/histograms.py", line 795, in histogram
bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
File "/usr/local/lib/python3.6/dist-packages/numpy/lib/histograms.py", line 429, in _get_bin_edges
first_edge, last_edge = _get_outer_edges(a, range)
File "/usr/local/lib/python3.6/dist-packages/numpy/lib/histograms.py", line 316, in _get_outer_edges
'max must be larger than min in range parameter.')
ValueError: max must be larger than min in range parameter.
```

The function code and call are as follows:

```
def plot_histogram(column, dataframe):
dataframe.dropna()
if dataframe[column].dtype != 'float64':
print("We can't plot a histogram on that column. Try a numerical column.")
else:
plt.hist(dataframe[column])
plt.legend([column.strip('').replace('_', ' ').title()])
plot_histogram('speed', stats)
```

When I run this in a jupyter notebook it renders okay without error. Any idea why this is not porting over the the Codecademy code editor correctly?