-6
import bumpy as np
import matplotlib.pyplot as per
import pandas as pd.

控制台显示一些警告。谁能帮我这个

4

2 回答 2

0

In python, when you import a library, it is expected to be utilized in the code blocks. Hence, as it obviously states, you may have imported these but have not used all of them.

Besides that being the obvious warning, your imports should have been

import numpy as np

NOT bumpy.

And remove the unnecessary period following the pandas import.

import pandas as pd

But if you still want to have imports and not use them, or keep them for later declarations, you could choose to suppress or ignore the warnings, which I do not endorse. But, if you so badly want to get rid of 'em, you can do so by adding the following line to the beginning of your code.

import warnings
warnings.filterwarnings("ignore")
于 2019-08-08T09:56:38.163 回答
0

That's probably from e.g. pyflakes shown in your IDE console.

It just gives you a hint that you've imported a module and not used it (yet).

The warning will go away as soon as you've used at least one function from the imported modules in the following code.

于 2019-08-08T09:56:56.427 回答