whats the error
import pandas as pd
import matplotlib.pyplot as plt
uae=pd.DateFrame = ([[1, 0], [2, 0], [3, 53], [4, 549], [5, 661], [6, 421],[7, 283], [8, 541], [9, 1100], [10, 1121], [11, 1107],[12, 1730]])
uae.columns=(["months","cases"])
print(uae)
plt.plot(uae.loc[:, "months"], uae.loc[:, "cases"])
plt.title("corona cases in the UAE")
plt.xlabel("2020y per month")
plt.ylabel("total cases")
plt.xticks([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
plt.show()
Voters
DavidShen2 (60)
On line 3, remove the second '=' sign.
You should use
DataFrame
instead ofDateFrame
Same problem @Chocolate16
@HASSANAYMAN what issue are you seeing now? I ran your code and it created a plot successfully.
If you see message in red so thats just warning, error if there are "tabs" @HASSANAYMAN
@HASSANAYMAN, @DavidShen2 has pointed you correctly on your issue. It is redundant equal sign between DataFrame and your data in line 3.
Thank you problem solved @Chocolate16