You can't do this unless there is a single file which is imported by all of the other files. And even in that case, you either have to use from <file> import *
(which is not a good practice), or use <file>.<module>
every time you want to reference one of those modules, which just makes things unnecessarily long.
Therefore, doing this is not usually a good idea...
...However, if there are a lot of imports shared by all files and you are sure that doing this would make your code much clearer, you could consider creating a new file specifically for this purpose.
For example, you could add a file called common_imports
at the top level, put all the imports in there, and just use from common_imports import *
at the start of each file.
So:
common_imports.py
import numpy as np
import pandas as pd
...
...
Other files
from common_imports import *
... # Other imports
...
...