![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pandas
louisliushu
这个作者很懒,什么都没留下…
展开
-
KeyError: ‘Passing list-likes to .loc or [] with any missing labels is no longer supported, see http
KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'问题原因的读取的Dateframe的columns和自己设定的不一致,所导致;检查并修正后OK了!修正如下:.原创 2020-08-04 11:21:11 · 16187 阅读 · 2 评论 -
最细总结_Duplicated()找到(所有)重复项 / / Drop_duplicates()找出每组(第一个)重复项 / /找出每组(最后一个)重复项
Duplicated()找出重复项_找出所有重复项含本身写简单些,就取3行数据df_search.loc[:,['PCI','Longitude','Latitude']].duplicated(keep=False)取出所有重复的项,那就简单了df_search[df_search.loc[:,['PCI','Longitude','Latitude']].du...原创 2019-04-07 19:47:01 · 2962 阅读 · 0 评论