网站集合二

import pandas as pd

如果需要的话,需将df中的date列转为datetime

df.date = pd.to_datetime(df.date,format="%Y%m%d")

将改好格式的date列,设置为df的index

df.set_index('date',drop=True)

按年来提数据 (因为此时的datetime已经为index了,可以直接[]取行内容)

df['2018']

df['2018':'2021']

按月来提数据

df['2018-01']

df['2018-01':'2018-05']

按天来提出数据

df['2018-05-24':'2018-09-27']

按日期汇总数据

将数据以W星期,M月,Q季度,QS季度的开始第一天开始,A年,10A十年,10AS十年聚合日期第一天开始.的形式进行聚合

df.resample('W').sum()

df.resample('M').sum()

具体某列的数据聚合

df.price.resample('W').sum().fillna(0) #星期聚合,以0填充NaN值

某两列

df[['price','num']].resample('W').sum().fillna(0)

某个时间段内,以W聚合,

df["2018-5":"2018-9"].resample("M").sum().fillna(0)

https://blog.csdn.net/sinat_41701878/article/details/80491631

还有以下方式聚合


image.png

https://blog.csdn.net/starter_____/article/details/81390443

Pandas —— 日期范围date_range()、移动数据shift()及日期位移rollforward()和rollback()

高效率 navicat copy 表

ORACLE中 SQL语句查询后;拼接列;拼接行

1.拼接多的值列 这是横向凭借

=== 同一行数据 不同列的拼接===
SELECT RIP.P_TS ||','|| RIP.P_DT
FROM RI_PAY RIP where RIP.O_NBR='RI201503240002'

查询结果: 1427185223921,2015-03-18

2.拼接多行数据

select wm_concat(P_TS) P_TS from RI_PAY RIP where RIP.O_NBR='RI201503240002' ;

查询结果:1427185223921,1427185273713,1427185251760

还可以;替换 “,” replace(wm_concat(name),',','*****') ;就是用****替换原来的 ",";

select replace(wm_concat(P_TS),',','*****') P_TS from RI_PAY RIP where RIP.O_NBR='RI201503240002' ;

查询结果: 1427185223921*****1427185273713*****1427185251760

3.在查询结果的后面;每一行都加上固定值

select P_TS,'固定值' dd from RI_PAY RIP where RIP.O_NBR='RI201503240002' order by RIP.P_CRTDT desc

查询结果:

1427185273713 固定值
1427185251760 固定值
1427185223921 固定值

https://github.com/topics/machine-learning?q=%E7%AE%97%E6%B3%95&unscoped_q=%E7%AE%97%E6%B3%95
https://github.com/search?l=Jupyter+Notebook&q=%E7%AE%97%E6%B3%95&type=Repositories
机器学习算法应用场景
https://blog.csdn.net/abc52shenghuo/article/details/77990579
https://blog.csdn.net/liulingyuan6/article/details/53648273
https://blog.csdn.net/liulingyuan6/article/details/53637846

依据用户轨迹的商户精准营销
https://www.datafountain.cn/competitions/245/details/data-evaluation

客户画像 主办方:国家电网 & 中国计算机学会
https://www.datafountain.cn/competitions/242/details/data-evaluation
http://www.doc88.com/p-7834947508152.html

监控场景下的行人精细化识别
https://www.datafountain.cn/competitions/235/details/data-evaluation
http://blog.sina.com.cn/s/blog_ab3b85680102wpyc.html
http://blog.sina.com.cn/s/blog_ab3b85680102wpxr.html
http://cdmd.cnki.com.cn/Article/CDMD-10357-1015383955.htm
http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=zgkjlwzx201714003
互联网情绪指标和生猪价格的关联关系挖掘和预测
https://www.datafountain.cn/competitions/223/details/data-evaluation
https://www.bbcyw.com/p-7804660.html
京东JData算法大赛-高潜用户购买意向预测
https://www.datafountain.cn/competitions/247/details/data-evaluation
https://github.com/daoliker/JData
https://blog.csdn.net/liuhuoxingkong/article/details/70049019
https://blog.csdn.net/yasin0/article/details/84404493
https://www.cnblogs.com/1113127139aaa/p/10021034.html
https://wenku.baidu.com/view/ebf2843c0622192e453610661ed9ad51f11d5451.html
竞赛社区:
https://www.kaggle.com/competitions
https://tianchi.aliyun.com/competition/gameList/activeList
https://www.kesci.com/
https://www.datafountain.cn/competitions
http://www.dcjingsai.com/static_page/cmpList.html

数据集:
https://blog.csdn.net/m0_37167788/article/details/79093827
https://www.leiphone.com/news/201801/2O4PbNH5YjJAxH6C.html

案例分析:
http://www.wangqingbaidu.cn/article/dlp1535793589.html
https://blog.csdn.net/Jorocco/article/details/81428996
https://blog.csdn.net/qq_28773159/article/details/79752718
https://blog.csdn.net/xinmei6/article/details/82116020
https://blog.csdn.net/zjlamp/article/details/81606222

有趣:
https://www.eefocus.com/industrial-electronics/394468/r0
https://www.leiphone.com/news/201609/ayG6aNQ7XHRTVD4W.html
https://blog.csdn.net/qq_20408903/article/details/80628331
https://www.jianshu.com/p/d868444653e3
http://www.woshipm.com/data-analysis/560733.html
http://www.huodonghezi.com/news-1060.html
http://www.woshipm.com/data-analysis/441607.html
http://ued.chinanetcenter.com/?p=3353
https://36kr.com/p/5128049
https://blog.csdn.net/ifwinds/article/details/79007421
http://www.woshipm.com/tag/persona
https://edu.talkingdata.com/learning
http://doc.talkingdata.com/posts/508
https://www.zhihu.com/question/19853605?sort=created
https://blog.csdn.net/zw0Pi8G5C1x/article/details/83964888
https://www.cnblogs.com/cescyang/p/6017608.html
https://blog.csdn.net/faith_binyang/article/details/79315545
http://www.woshipm.com/it/250043.html
http://www.woshipm.com/topics
http://www.woshipm.com/ai/1998586.html
https://www.pmcaff.com/activity
http://www.sohu.com/a/122522005_465615

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。