Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython Notebook 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.

like image 806
jootl Avatar asked Oct 20 '22 21:10

jootl


1 Answers

%recall jupyter_notebook_cell_number

Should give you the code that was last executed in indicated particular notebook cell, jupyter_notebook_cell_number

like image 73
meljw Avatar answered Jan 04 '23 07:01

meljw