0

I have written a .py function on an emr notebook and want to use this function on another emr notebook file when I import the function with the file name it gives an error. Can someone please Help thanks error when i tried to import  the function other file code

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Mobeen
  • 76
  • 9
  • notebooks are not python file, you cannont import them with an `import` command. But I think you have some magic commands like `%run welcome.ipynb` which could do the trick – Steven Nov 04 '21 at 12:56
  • Does this answer your question? [ipynb import another ipynb file](https://stackoverflow.com/questions/20186344/ipynb-import-another-ipynb-file) – Steven Nov 04 '21 at 12:56
  • hi i have use the run magic command and it didn't worked – Mobeen Nov 04 '21 at 13:16
  • Hi Can you share an example in which i can import files from one notebook to another on EMR CLUSTER – Mobeen Nov 04 '21 at 13:22
  • `it didn't worked` does not mean anything. What did you try ? what was the output ? any error message ? – Steven Nov 04 '21 at 13:27
  • hi @Steven sorry for the late reply I got stuck in some other work, I have tried to run this Magic run command and it says module not found, currently, i am running to notebooks and I want to import the function of Notebook a to Notebook B Errors are attached below https://imgur.com/Sl3Tg9X – Mobeen Nov 05 '21 at 06:24
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/238899/discussion-between-steven-and-kaolin). – Steven Nov 05 '21 at 09:12

0 Answers0