Avatar ·

How to streamline the dates on the graph in an increase in the order?

📁 Advanced Python Topics, pandas, matplotlib

There is a CSV file with a number of sick people over the past year, but it has an incorrect structure, i.e. first there is today's date, then yesterday, etc.

How to build the correct graph, so that from the past to the present, and not vice versa?

import pandas as pd
import matplotlib.pyplot as plt
data = pd.read_csv('Data.txt')
plt.plot(data['"call"'])
plt.show()

I tried: data = data[::-1]