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行,i在范围内(len(creditcard_df.columns)):^ SyntaxError:语法无效
在此先感谢您提供的任何建议。
该错误实际上是在您忘记关闭方括号的第一行。 plt.figure(figsize=(10,50))
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句