@SVN your CSV file has a ton of unrelated junk in it that is preventing proper parsing by Pandas. The first “title” line, the “notes” at the end. None of that should be in a CSV file. Because of this cruft, Pandas is not properly able to interpret the types of your data, e.g:
In [3]: years
Out[3]:
2 1990
3 1991
< edited >
28 2016
29 2017
Name: Air pollutant emissions, Canada, 1990 to 2017, dtype: object
In [4]: carbonMonoxide
Out[4]:
2 0
3 -2
<edited>
28 -54
29 -54
Name: Unnamed: 5, dtype: object
Notice the dtype is object, instead of some actual numeric type that it should be. This is almost certainly the root cause of what you are observing with Bokeh (I’m suprised it works at all, in any fashion, with object dtypes)
One red flag was also these lines:
years = stats.iloc[2:30,0]
carbonMonoxide = stats.iloc[2:30,5]
You should really never need hacky things like this. A CSV file should contain the data, and optionally the column headers, and nothing else. If you really can’t delete that junk from the file entirely, you will need to find a way to filter it out before Pandas loads it.