随笔分类 - python
python学习
摘要:map() fution:map(func, *iterables) --> map object reduce() filter()
阅读全文
摘要:收藏网站 : https://python-course.eu/advanced-python/lambda-filter-reduce-map.php
阅读全文
摘要:在pycharm终端输入pip install pandas 可以直接安装整个txt文件的组件,pip install 文件
阅读全文
摘要:在请求的时候加上 verify=False 即可 if method == METHOD_GET: res = requests.get(url=url, headers=headers, verify=False)elif method == METHOD_POST: res = requests
阅读全文
摘要:http://c.biancheng.net/view/2256.html
阅读全文
摘要:https://www.linuxidc.com/Linux/2019-01/156137.htm
阅读全文
摘要:dfs_duplicated = dfs.duplicated(subset=sub_set, keep=False)
阅读全文
摘要:https://www.runoob.com/python/att-string-format.html >>>"{} {}".format("hello", "world") # 不设置指定位置,按默认顺序 'hello world' >>> "{0} {1}".format("hello", "
阅读全文
摘要:validations = { "not_blank": CustomElementValidation( lambda x: x is not np.nan and len(str(x).strip()) > 0, 'cannot be blank'), "not_empty_array": Cu
阅读全文
摘要:获取当前文件的全路径:path = os.path.abspath(__file__)获取全路径中的路径,就是不要文件名 filepath = os.path.join(os.path.split(path)[0], 'files')
阅读全文
摘要:df = pd.read_csv(file, sep=sep, compression=compression, dtype=object, encoding='cp1252')其中 compression='|'如果输入csv文件里一列长这样:111|2222|333444|555|666那读取的
阅读全文
摘要:抽取dataFrame的2列出来做dictcloud_approved_map = {item['EntityId']: item['IsCloudApproved'] for item in entity_value_map.to_dict('records')} errors_index_row
阅读全文
摘要:for index, row in sourceDataframe.iterrows(): if splitBy in row: split_index = row[splitBy] if split_index in remEntitys: remDFList.append(row) elif s
阅读全文
摘要: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 =
阅读全文
摘要:for df in dfs: print(df.result())
阅读全文
摘要:result = mergeresult[mergeresult.columns]
阅读全文
摘要:http://t.zoukankan.com/traditional-p-13090698.html
阅读全文
摘要:https://blog.csdn.net/erinapple/article/details/80838359 三目运算符: tmp = data.assign(**{'ws^2': data.apply(lambda row: sum(row['ws'] * np.where( row['fac
阅读全文
摘要:https://blog.csdn.net/qq_27825451/article/details/82698929
阅读全文
摘要:用numpy.float64,在做groupby的时候,其他str字段不会连到一起,组合成一大串 agg = sensis.groupby(by=['bu'], as_index=False).sum()用float来groupby 的话,其他列的字段多个合并成一连串
阅读全文

浙公网安备 33010602011771号