I am new in Python. I am trying to learn by watching youtube videos or other online tutorials.
When I did a similar code in Pycharm I see the following:-
import matplotlib.pyplot as plt
import pandas as pd
cars = pd.read_csv("./cars.csv")
cars = cars.rename( columns={'Unnamed: 0':'model'})
print("car:\n",cars)
y1 = cars['hp']
x = range(32)
print(plt.plot(x,y1))
Output:-
car:
model mpg cyl disp hp ... vs am gear carb 2am
0 Mazda RX4 21.0 6 160.0 110 ... 0 1 4 4 2
1 Mazda RX4 Wag 21.0 6 160.0 110 ... 0 1 4 4 2
2 Datsun 710 22.8 4 108.0 93 ... 1 1 4 1 2
3 Hornet 4 Drive 21.4 6 258.0 110 ... 1 0 3 1 0
.....
31 Volvo 142E 21.4 4 121.0 109 ... 1 1 4 2 2
[32 rows x 13 columns]
[<matplotlib.lines.Line2D object at 0x7ff689975240>]
I trucked output from 1 to 31. My confusion why I don't see the graph as it is shown in the video. What is missing or what is wrong?