You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While there are ways to convert the .ipynb to .py and vice versa, both directions bring certain unwanted issues that should be addressed.
From .ipynb to .py
The go-to way is to use jupyter nbconvert --to script 'example.ipynb'. This results in a working example. This can be followed up with using the clean_py_notebooks.py to make them more usable, however there are still empty quotes left over. Furthermore, it converts all the files in hard coded directories.
Create a script that combines the command above with the clean_py_notebooks.py file so that the conversion from .ipynb to .py is seamless. The script should allow you to both choose specific files to be converted, and in addition also convert whole example libraries.
From .py to .ipynb
This direction is of lesser importance because the .ipynb will remain the actively developed examples. There are two options:
The p2j (installed with pip) package does allocate code and markdown cells properly, but introduces countless <br> instances and does not allocate headers in markdown cells consistently.
The two options are both sub-optimal, which could use more work in the future also by means of a script.
The text was updated successfully, but these errors were encountered:
While there are ways to convert the .ipynb to .py and vice versa, both directions bring certain unwanted issues that should be addressed.
From .ipynb to .py
The go-to way is to use
jupyter nbconvert --to script 'example.ipynb'
. This results in a working example. This can be followed up with using the clean_py_notebooks.py to make them more usable, however there are still empty quotes left over. Furthermore, it converts all the files in hard coded directories.Solution:
From .py to .ipynb
This direction is of lesser importance because the .ipynb will remain the actively developed examples. There are two options:
<br>
instances and does not allocate headers in markdown cells consistently.The two options are both sub-optimal, which could use more work in the future also by means of a script.
The text was updated successfully, but these errors were encountered: