上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: df = pd.read_csv(file, sep=sep, compression=compression, dtype=object, encoding='cp1252')其中 compression='|'如果输入csv文件里一列长这样:111|2222|333444|555|666那读取的 阅读全文
posted @ 2022-02-15 10:44 ivyJ 阅读(364) 评论(0) 推荐(0)
摘要: 抽取dataFrame的2列出来做dictcloud_approved_map = {item['EntityId']: item['IsCloudApproved'] for item in entity_value_map.to_dict('records')} errors_index_row 阅读全文
posted @ 2022-02-14 15:39 ivyJ 阅读(283) 评论(0) 推荐(0)
摘要: for index, row in sourceDataframe.iterrows(): if splitBy in row: split_index = row[splitBy] if split_index in remEntitys: remDFList.append(row) elif s 阅读全文
posted @ 2022-02-14 14:57 ivyJ 阅读(247) 评论(0) 推荐(0)
摘要: with open(output, 'w') as f: json.dump(exit_message, f)其中output 是json文件的具体路径把内容写入json文件里 with open("../config/record.json",'r') as load_f: load_dict = 阅读全文
posted @ 2022-02-14 14:36 ivyJ 阅读(1385) 评论(0) 推荐(0)
摘要: for df in dfs: print(df.result()) 阅读全文
posted @ 2022-02-09 18:23 ivyJ 阅读(22) 评论(0) 推荐(0)
摘要: result = mergeresult[mergeresult.columns] 阅读全文
posted @ 2022-01-27 18:33 ivyJ 阅读(29) 评论(0) 推荐(0)
摘要: http://t.zoukankan.com/traditional-p-13090698.html 阅读全文
posted @ 2022-01-11 18:31 ivyJ 阅读(12) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/erinapple/article/details/80838359 三目运算符: tmp = data.assign(**{'ws^2': data.apply(lambda row: sum(row['ws'] * np.where( row['fac 阅读全文
posted @ 2022-01-10 16:23 ivyJ 阅读(74) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/qq_27825451/article/details/82698929 阅读全文
posted @ 2022-01-10 15:50 ivyJ 阅读(17) 评论(0) 推荐(0)
摘要: 用numpy.float64,在做groupby的时候,其他str字段不会连到一起,组合成一大串 agg = sensis.groupby(by=['bu'], as_index=False).sum()用float来groupby 的话,其他列的字段多个合并成一连串 阅读全文
posted @ 2022-01-06 11:35 ivyJ 阅读(625) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页