Importing one workbook into another

I tried to import one workbook (to use its functions) into another by the following methods [1]:

  • %run MyOtherNotebook.ipynb

Output: ‘SyntaxError: invalid syntax’

  • import import_ipynb
    import MyOtherNotebook

Output: “No module named ‘import_ipynb’”
(So I searched in Datalore library and this module was not present in the library.)

  • import nbimporter
    import MyOtherNotebook

Output: ‘AttributeError: kernelspec’

Kernel: Datalore

By the way, I had the MyOtherNotebook in the same folder as the workbook I wanted this file to import in. I also uploaded both MyOtherNotebook.ipynb and MyOtherNotebook.datalore in the uploaded files box.

Nothing of above solutions worked for me. So I think importing one workbook into another is not available yet on Datalore. If this is indeed the case, this feature may be added in future.

1 Like