I wrote some functions on Jupyter notebook and want to save the script in form of .py, but anaconda jupyter notebook automatically saves the script as .ipynb, How can I change it to .py for this specific script? Is there any command for it? Thanks
Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the save icon and your notebook edits are saved.
Right-click the Python window and select Save As to save your code either as a Python file (. py) or Text file (. txt). If saving to a Python file, only the Python code will be saved.
In Jupyter lab, go to File Menu. Select "Export Notebook as" and then choose the "Export Notebook to Executable Script" option. For Jupyter notebook, there is "Download as" option in File menu of Jupyter notebook.
You can download a copy of the python as a .py
script from FILE
menu in the upper left corner. See this photograph.
That should do it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With