摘要: 1.前言背景 没怎么用过df.where 都是直接使用loc、apply等方法去解决。 可能是某些功能还没有超出loc和apply的适用范围。 2.进入df.where和df.mask note:Replace values in DataFrame with other where the con 阅读全文
posted @ 2019-11-01 15:30 wqbin 阅读(5650) 评论(0) 推荐(1) 编辑
摘要: pandas 遍历有以下三种访法。 0.for i in df:并不是遍历行的方式 正式因为for in df不是直接遍历行的方式所以我们研究了如下方法。 1.iterrows():在单独的变量中返回索引和行项目,但显着较慢 2.itertuples():快于.iterrows(),但将索引与行项目 阅读全文
posted @ 2019-11-01 11:03 wqbin 阅读(45452) 评论(0) 推荐(3) 编辑
摘要: 在SQL语言中去重是一件相当简单的事情,面对一个表(也可以称之为DataFrame)我们对数据进行去重只需要GROUP BY 就好。 select custId,applyNo from tmp.online_service_startloan group by custId,applyNo 1.D 阅读全文
posted @ 2019-11-01 10:39 wqbin 阅读(15716) 评论(0) 推荐(0) 编辑