How change the date distance and only showing month in a year?
import pandas as pd
import numpy as np
import xlsxwriter
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import datetime
df = pd.read_csv('lclax.csv')
x =df['Date']
y= df['Close']
plt.plot(x , y)
plt.title("Los Cerros Daily Share Price")
plt.xlabel("Date")
plt.ylabel("Price")
plt.xticks( rotation=90)
plt.show()
I've tried several methods but nothing seem to be working, FYI I'm new to coding so any suggestion is welcomed. Trying to learn to format the dates in the picture into either showing DD/MM/YY in monthly frequency or months only in the year.
Date Open High Low Close Adj Close Volume
0 02/01/2020 0.070 0.070 0.068 0.069 0.069 33728
1 03/01/2020 0.069 0.070 0.068 0.068 0.068 65471
2 06/01/2020 0.068 0.070 0.066 0.067 0.067 306723
3 07/01/2020 0.067 0.067 0.067 0.067 0.067 64016
4 08/01/2020 0.066 0.067 0.062 0.064 0.064 969921
.. ... ... ... ... ... ... ...
243 14/12/2020 0.100 0.105 0.093 0.100 0.100 8060996
244 15/12/2020 0.099 0.099 0.095 0.095 0.095 1876563
245 16/12/2020 0.099 0.100 0.096 0.096 0.096 2707856
246 17/12/2020 0.099 0.099 0.098 0.098 0.098 1518175
247 18/12/2020 0.098 0.098 0.095 0.096 0.096 2124907
[248 rows x 7 columns]