pandas plt.legend issue. error says that 'legend only accepts two non-keyword arguments'
You have to put the values in a list:
plt.legend([df.iat[0, 0], df.iat[0, 1], df.iat[0, 2]])
I use the below statement, extracting cell content as legend name (I have 3 set of values to plot on y-axis, thus need 3 legend parameters)
plt.legend(df.iat[0, 0], df.iat[0, 1], df.iat[0, 2])
the compiled error says that 'legend only accepts two non-keyword arguments'
I print out the df.iat[0, 0], df.iat[0, 0], df.iat[0, 0], all these 3 are the cell content I expect.
Anyone know how I can fix it?