How to convert .py file into .ipymb

I have few files with .py extention but I want to them in jupyter notebook. So, the required extention is .ipymb .



So, how to convert .py into .ipymb

Hi Sridhar,



To convert a file from .py to .ipynb you can carry out the following steps:

  1. Install p2j
  2. Convert the .py file to .ipynb
p2j filename.py

Note: You need to replace 'filename' with the name of your py file.



At this link you will find examples and all the steps to convert the file using p2j. Alternatively, you can also refer to this link.





Thanks,

Rushda Ansari

hello,



i think spyder has the convertor… it is in save as if i am not mistaken…