Is it possible in an IPython-Notebook cell to get the previous (above) cell content ?
I can see previous output with %capture magic function but I don't find how to get the previous cell content.
Is it possible in an IPython-Notebook cell to get the previous (above) cell content ?
I can see previous output with %capture magic function but I don't find how to get the previous cell content.
I didn't find how to get the previous content cell in a cell.
But I found another solution, creating a custom magic notebook function to capture the cell content and work with that.
You can get content of the last executed cell with:
In[len(In)-2]
%recall jupyter_notebook_cell_number
Should give you the code that was last executed in indicated particular notebook cell, jupyter_notebook_cell_number