I have a dataframe in which each row relates to a day of the week, starting on Sunday. there are 39 rows in total. I would like to plot the numerical values from the column Physical
one week at a time with the days of the week labelled on the x-axis. I have this so far:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("health.csv", header = None, names = ['Physical', 'Emotional'])
ax = df['Physical'].plot()
plt.show()
This gives:
How can I label the x-axis by the days of the week, starting on Sunday and split the weeks so that they are separated vertically.
The full data is:
5,5
6,7
6,9
6,7
5,6
7,9
5,9
6,7
7,6
7,4
7,5
6,7
7,9
7,9
5,6
8,7
9,9
7,7
7,6
7,8
7,9
7,9
7,6
7,8
6,6
6,6
6,7
6,6
6,5
6,6
7,5
7,5
7,5
7,6
7,5
8,6
7,6
7,7
6,6