1.SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame 场景:运用pandas修改某个序号所对应的key值时出现了该类警告 https://stackoverflow.com/questions/26724378/pandas-settingwithcopywarning 代码: df_index = df.loc[index]df_index[key] = value…
经过整理与在实际中遇到的问题,将新手经常遇到的汇总下,以便自己犯傻又这么干了 1)"SyntaxError :invalid syntax",语法错误 A.查看是否在 if , elif , else , for , while , class ,def 声明末尾添加 ": if number == 42 #未加':',应该为if number == 42: if number= 42: #赋值操作符错误,应该为if number == 42: print(' The num…