I prefer to write my python code on VSCode because of its intellisense and autocomplete features. But I would rather see and debug the code on a Jupyter notebook to better visualize the data I am working with.
I know I can load any file into Jupyter by using the magical %load
or %loadpy
commands. But they load the entire file into a single cell.
Since I wanted to see the intermediary results of certain operations, I would like to import the file in such a way that each line on the file is assigned to a cell on the notebook. Unless it's a function or conditional statement (in other words, anything with indentation); in these cases it should add the whole block into one cell.
How can I do that?