If you are trying to achieve three plots side by side, one for each year, I suggest you tp use the holoviews
package. This will work:
import holoviews as hv
hv.Layout([Company[Company.Year==i].hvplot.bar(x='CompanyID', y='Sales',rot=90, label=str(i)) for i in [2019, 2020, 2021]])
Otherwise, if you want all of them in the same plot, you have to do an Overlay
:
hv.Layout([Company[Company.Year==i].hvplot.bar(x='CompanyID', y='Sales',rot=90, label=str(i)) for i in [2019, 2020, 2021]])
If you run these commands inside Jupyter Lab/Notebook as the last line of a cell the plots will show up.