zhengyyao

导航

2017年9月11日 #

pandas 数据处理遇到的问题

摘要: 数据为DataFrame格式,如下: 1.对每一行,FirstCab的值为空时,Weight的值乘以0.8 方法一(可行):df.loc[df['FirstCab'].isnull(),'Weight'] *= 0.8 方法二(可行):df['Weight'] = np.where(df['Firs 阅读全文

posted @ 2017-09-11 23:36 zhengyyao 阅读(15733) 评论(0) 推荐(0)