import pandas as pd
如果需要的話(huà),需將df中的date列轉(zhuǎn)為datetime
df.date = pd.to_datetime(df.date,format="%Y%m%d")
將改好格式的date列,設(shè)置為df的index
df.set_index('date',drop=True)
按年來(lái)提數(shù)據(jù) (因?yàn)榇藭r(shí)的datetime已經(jīng)為index了,可以直接[]取行內(nèi)容)
df['2018']
df['2018':'2021']
按月來(lái)提數(shù)據(jù)
df['2018-01']
df['2018-01':'2018-05']
按天來(lái)提出數(shù)據(jù)
df['2018-05-24':'2018-09-27']
按日期匯總數(shù)據(jù)
將數(shù)據(jù)以W星期,M月,Q季度,QS季度的開(kāi)始第一天開(kāi)始,A年,10A十年,10AS十年聚合日期第一天開(kāi)始.的形式進(jìn)行聚合
df.resample('W').sum()
df.resample('M').sum()
具體某列的數(shù)據(jù)聚合
df.price.resample('W').sum().fillna(0) #星期聚合,以0填充N(xiāo)aN值
某兩列
df[['price','num']].resample('W').sum().fillna(0)
某個(gè)時(shí)間段內(nèi),以W聚合,
df["2018-5":"2018-9"].resample("M").sum().fillna(0)
https://blog.csdn.net/sinat_41701878/article/details/80491631
還有以下方式聚合
https://blog.csdn.net/starter_____/article/details/81390443
Pandas —— 日期范圍date_range()、移動(dòng)數(shù)據(jù)shift()及日期位移rollforward()和rollback()
高效率 navicat copy 表
ORACLE中 SQL語(yǔ)句查詢(xún)后;拼接列浑玛;拼接行
1.拼接多的值列 這是橫向憑借
=== 同一行數(shù)據(jù) 不同列的拼接===
SELECT RIP.P_TS ||','|| RIP.P_DT
FROM RI_PAY RIP where RIP.O_NBR='RI201503240002'
查詢(xún)結(jié)果: 1427185223921,2015-03-18
2.拼接多行數(shù)據(jù)
select wm_concat(P_TS) P_TS from RI_PAY RIP where RIP.O_NBR='RI201503240002' ;
查詢(xún)結(jié)果:1427185223921,1427185273713,1427185251760
還可以;替換 “,” replace(wm_concat(name),',','*****') ;就是用****替換原來(lái)的 ",";
select replace(wm_concat(P_TS),',','*****') P_TS from RI_PAY RIP where RIP.O_NBR='RI201503240002' ;
查詢(xún)結(jié)果: 1427185223921*****1427185273713*****1427185251760
3.在查詢(xún)結(jié)果的后面;每一行都加上固定值
select P_TS,'固定值' dd from RI_PAY RIP where RIP.O_NBR='RI201503240002' order by RIP.P_CRTDT desc
查詢(xún)結(jié)果:
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
機(jī)器學(xué)習(xí)算法應(yīng)用場(chǎng)景
https://blog.csdn.net/abc52shenghuo/article/details/77990579
https://blog.csdn.net/liulingyuan6/article/details/53648273
https://blog.csdn.net/liulingyuan6/article/details/53637846
依據(jù)用戶(hù)軌跡的商戶(hù)精準(zhǔn)營(yíng)銷(xiāo)
https://www.datafountain.cn/competitions/245/details/data-evaluation
客戶(hù)畫(huà)像 主辦方:國(guó)家電網(wǎng) & 中國(guó)計(jì)算機(jī)學(xué)會(huì)
https://www.datafountain.cn/competitions/242/details/data-evaluation
http://www.doc88.com/p-7834947508152.html
監(jiān)控場(chǎng)景下的行人精細(xì)化識(shí)別
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
互聯(lián)網(wǎng)情緒指標(biāo)和生豬價(jià)格的關(guān)聯(lián)關(guān)系挖掘和預(yù)測(cè)
https://www.datafountain.cn/competitions/223/details/data-evaluation
https://www.bbcyw.com/p-7804660.html
京東JData算法大賽-高潛用戶(hù)購(gòu)買(mǎi)意向預(yù)測(cè)
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
競(jìng)賽社區(qū):
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
數(shù)據(jù)集:
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
http://www.reibang.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