无法弄清楚我的for循环中有什么语法错误


plt.figure(figsize=(10,50)
for i in range(len(creditcard_df.columns)):
plt.subplot(17,1,i+1) #to plot 17,1,1 17,1,2 17,1,3 etc. 
sns.distplot(creditcard_df[creditcard_df.columns[i]],kde_kws= 
{"color":"b","lw":2,"label":"KDE"},hist_kws={"color":"g")
plt.title(creditcard_df.columns[i]) #the index titles seen above
plt.tight_layout

错误消息如下:

文件"&";,第5行对于范围(len(creditcard_df.columns((中的i:^SyntaxError:语法无效

提前感谢,感谢你们能给我的任何建议。

错误实际上发生在忘记关闭括号的第一行。plt.figure(figsize=(10,50))

最新更新