
python
指指纹
这个作者很懒,什么都没留下…
展开
-
python 学习笔记 正则表达式提取数据中的数字以及图表上标识数值
python 正则表达式提取数据中的数字以及图表上标识数值先自定义提取数字函数import redef delword(word): num = float(re.sub(r'[\u4e00-\u9fff]*\/*[\u4e00-\u9fff]','',word)) return num 将函数应用到dataframe中 pd.DataFrame['...'] =...原创 2019-01-04 14:56:06 · 642 阅读 · 0 评论 -
python 之pandas学习(1)
groupby()分类:返回series写法:drinks.groupby('continent').beer_servings.agg('mean')drinks.groupby('continent').beer_servings.mean()返回dataframe写法:drinks[['beer_servings','continent']].groupby('continen...原创 2019-01-04 15:53:10 · 161 阅读 · 0 评论