Data frame object has no attribute "plt" : <p>I am trying to do some machine learning work in python but i cant plot anything using matplotlib. When i try to run the program, i get the error as shown in the screenshot.
<a href="https://i.stack.imgur.com/3Ogdz.png" rel="nofollow noreferrer">error</a></p>

<p>Here is the code that i am trying to run. I am using Spyder IDE.</p>

<pre><code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt


dataset=pd.read_csv('student_scores.csv')

print(dataset.shape)

print(dataset.describe())

dataset.plt(x='Hours',y='Scores',style='o')
plt.title('Hours vs Scores')
plt.xlabel('Hours Studied')
plt.ylable('Score obtained')
plt.show()
</code></pre>

<p>I have tried to uninstall matplotlib and installed it again but it did not work. Can someone help?</p>
