会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
mollyliu
博客园
首页
新随笔
联系
订阅
管理
2021年11月2日
pandas 实现 以A列值作为唯一值,将A列值相同的数据合并为一条数据,以分号分隔
摘要: df_merge = data2.groupby('唯一值').agg({'序号': ';'.join}
阅读全文
posted @ 2021-11-02 11:39 mollyliu
阅读(286)
评论(0)
推荐(0)
2021年10月8日
pandas 替换dataframe表头
摘要: data1.rename(columns=lambda x:x.replace('(','('), inplace=True)
阅读全文
posted @ 2021-10-08 15:46 mollyliu
阅读(1246)
评论(0)
推荐(0)
2021年9月30日
pandas学习笔记2
摘要: 1、筛选用法 loc、where • orgin_excel.loc[(orgin_excel['投资时间'].astype(str) <'2020-10-01')&(orgin_excel['数据状态'].isnull())&(orgin_excel['数据源'].str.contains('调研
阅读全文
posted @ 2021-09-30 16:24 mollyliu
阅读(171)
评论(0)
推荐(0)
2021年6月30日
python之判断字符串以何关键字开头
摘要: (str.startswith('关键字') is True:以关键字开头 False:不以关键字开头 还可以指定关键字所处位置: #!/usr/bin/python str = "this is string example....wow!!!"; print str.startswith( 't
阅读全文
posted @ 2021-06-30 13:30 mollyliu
阅读(237)
评论(1)
推荐(0)
公告