I have a file in csv, and I am separating the columns to display the information graphically using Matplotlib, however I have a problem when the information is empty, I change to 0 and try to display the graph again, but the result is always this:
Note that even though the information is equal to 0.00, this difference in the graph is the same.
Does anyone have any idea how to fix this?
The code is simple just for testing, I'm learning.
df = pd.read_csv('RAIN_SITE_1_01 .his')
create_date = df['CREATEDATE']
wx = df[' INSTANT RAIN (MM)']
#troca as informaçãoes de espaço vazio para 0, mas ta com problema
wx = wx.replace(' ', '0.00', regex=True)
print(wx)
plt.plot(create_date, wx)
plt.xticks(rotation=90)
plt.show()
Edit: What is displayed is:
0
1
2 0.00
3 0.00
4 0.00
5 0.00
6 0.00
Name: INSTANT RAIN (MM), dtype: object
I used replace to replace the empty information and replace it with 0, however as you can see it looks like the information even though they are the same, they are plotted as if they were different in the graph.