执行以下代码时收到警告:
sdist = np.sort(w.distance.unique())
for d in sdist:
z = w.loc[(w['distance']==d)]
if (z.shape[0]<500) & (d!=sdist[len(sdist)-1]):
z.loc[(z['distance']==d), 'distance'] = d+1
continue
SettingWithCopyWarning: 试图在DataFrame的切片副本上设置一个值。尝试改用.loc [row_indexer,col_indexer] = value
有什么想法吗?