[英]How can i overcome issue on column name of the given data frame in Python pandas and matplotlib
I have been trying to extract some data from a dataframe, where i am came with this issue.我一直在尝试从数据框中提取一些数据,我遇到了这个问题。 while i am trying to plot a line plot using matplotlib.plot(column_name) The dataframe had the column name " Ladder score" But this cannot excuted in the matplotlib plot function, we can't use space between words.
当我尝试使用 matplotlib.plot(column_name) 绘制线图时,数据框的列名称为“Ladder score”但这不能在 matplotlib 绘图函数中执行,我们不能在单词之间使用空格。 But the given column in dataframe put column name like that.
但是数据框中的给定列将列名放在这样的位置。 How can i overcome this issue.
我怎样才能克服这个问题。
image of error: https://drive.google.com/file/d/1LhKnZ9THGBDLryT3rwOxnnKixr4knDIE/view?usp=sharing错误图片: https : //drive.google.com/file/d/1LhKnZ9THGBDLryT3rwOxnnKixr4knDIE/view?usp=sharing
只需使用
plt.plot(b[" Ladder score"])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.