When running the code below on Spyder, part of the code shown on the IPython console disappears (i.e. it auto scrolls too far down)
get_ipython().magic(\'clear\')