简体   繁体   中英

Issues importing pandas tool scatter_matrix

I am currently facing an import issue with pandas.tools.plotting . I try to import the scatter matrix via

from pandas.tools.plotting import scatter_matrix

But I get the following error message from visual studio code:

[pylint] E0611:No name 'scatter_matrix' in module 'pandas.tools.plotting'

I also tried

from pandas.tools import scatter_matrix

but it didn't work either. Why can't I import the scatter matrix?

I am using

  • python 3.6.4
  • pandas 0.22.0

You need to use this line of code to import pandas scatter_matrix. As seen in the docs of pandas visualization.

from pandas.plotting import scatter_matrix

例如 scatter = pd.plotting.scatter_matrix(X, c = y, marker = 'o', s=40, hist_kwds={'bins':15}, figsize=(9,9), cmap = cmap)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM