i would like to have a plot of nasdaq market index that has on x axis the years since 1971 and on y axis the values.
dataframe = pd.read_csv('nasdaq-historical-chart.csv', usecols=[1], engine='python')
dataset = dataframe.values
df = pd.read_csv('nasdaq-historical-chart.csv',parse_dates=True)
df['date'] = pd.to_datetime(df['date'])
df['year'] = df['date'].dt.year
plt.plot(dataset)
plt.figure(figsize=(25,10))
plt.plot(df['year'], dataset)
plt.title('NASDAQ historical chart',fontsize=24)
plt.xlabel('Time',fontsize=14)
plt.ylabel('Value',fontsize=14)
plt.tick_params(axis='both',labelsize=14)
plt.show()
In this way i have the right plot but without years on x axis

If i put:
plt.plot(df['year'], dataset)
why the plot changed? How can i modify it?

I created some data similar to yours as example, and you can do in a similar way: