How to import a .py file from a directory

I am trying to import a .py file into my jupyter notebook. using the following code , but it is throwing an error. I have also included file in the directory

import sys 
import os

No module named ‘’; ‘test_standard’ is not a package

Did you try the following?

import test_standard

Yes , it worked . Thanks

1 Like