- 博客(1)
- 收藏
- 关注
原创 Python 连续赋值报错 A value is trying to be set on a copy of a slice from a DataFrame
原因:连续赋值解决办法:通过loc获取新的数据副本# 创建DataFramedf = pd.DataFrame(np.arange(12, 32).reshape((5, 4)), index=["a","b","c","d","e"], columns=["T","O","D","A"])print(df)''' T O D Aa 12 13 14 15b 16 17 18 19c 20 21 22 23d 24 25 26 27e
2022-01-11 20:37:15
860
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人