I'm trying to call df.plot.scatter(...) as shown here, where df is a pandas.Dataframe object.
But my IDE can't suggest any plot function when I initiate suggestions (though it can suggest other dataframe members like fillna(), to_json() etc).
If I anyway write df.plot.scatter(...) and run it, it gives error:
AttributeError: 'function' object has no attribute 'scatter'
I use python 3.4 on windows 7. My IDE is PyCharm. These are the imports:
import pandas as pd
import matplotlib.pyplot as plt
Can it be about my python version, or maybe this function is removed from pandas API? Thanks in advance.
I think your pandas version is older as 0.17.0.
See DataFrame.plot.scatter:
New in version 0.17.0.
In older version you can use:
df.plot(kind='scatter')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With