_import_() Function:

When there is a need for modules, we import them by using a single line code. But in some cases, we need to import modules in runtime. So, in these cases, we will be using the in-built function in python for data science _import_() .

import in python for data science

Now we will take into account certain examples for better understanding.

Example 1:

Example 2:

Note:- The function _import_ is rarely used in Python. But when we need to import modules during runtime, we need to use this function.

If you want to learn more about import function in python for data science, then you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.