0

I have a file called orbital.ipynb (in jupyter notebooks) .

I'm currently working on a new file called OrbitalStockSelector , and I'd like to import the orbital.ipynb file to the new file.

I've tried changing the extension to .py , using import_module(orbital) but have not been able to succeed. I get:

 ImportError: No module named orbital
thomas.mac
  • 1,236
  • 3
  • 17
  • 37

1 Answers1

0

.ipynb files are not valid python modules. They use a custom format to store the code and output. To use your code, you would need to move it to a valid .py file that is importable

thaavik
  • 3,257
  • 2
  • 18
  • 25