I want to save the Jupyter Notebooks as a .py
script but when I do it still keeps the cell notation, for example # In[81]
.
The problem is VS Code still recognizes this as a cell, so I can't run it like a script. How do I save the notebooks as a script but without the cell notations?
I've already tried:
- file -> download as -> Python(.py)
- Using
nbconvert
- I get the same result
In command I tried nbconvert
:
jupyter nbconvert --to python example.ipynb
I still get a .py
script with cells.