I have the following code:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
data = pd.read_csv("Ari_atlag.txt", sep = '\t', header = 0)
#Num_array = pd.DataFrame(data).to_numpy()
print(data.head())
data.plot()
#data.columns = ['Date', 'Number_of_test', 'Avarage_of_ARI']
#print(Num_array)
plt.show()
Output:
Date Number_of_test Avarage_of_ARI
0 2011-01 22 0.568734
1 2011-02 5 0.662637
2 2011-03 0 0.000000
3 2011-04 3 0.307692
4 2011-05 6 0.773611
Process finished with exit code 0
and the plot.
But with this code in the plot, the x axis is the index. But I want to get Date in x axis.
How to plot the Date with Number_of_test and Date with Avarage_of_ARI
I think, I somehow should change string(date) to dates, but don't know how to do that.
Best