[Python] When importing your own files, how do you handle other libraries that you need?

Asked 2 years ago, Updated 2 years ago, 72 views

For example,
There's a file called
that's a collection of handwritten functions called functions.py I want to retrieve these functions from abc.py and use them.

At that time, if the functions defined in functions use pandas, import pandas as pd
The location of the code is

I'm curious.

At the moment, both sides are imported because they need Pandas Essentially, the imported file has dependencies on other packages I don't know how it's imported ㅠ<

python import

2022-09-21 21:45

1 Answers

Abc when not using Pandas on abc.py.Declaration is unnecessary in py.

It's okay if it's number one.


2022-09-21 21:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.