国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

2017/02/07 - Extract attributes from index

2019-11-11 01:28:27
字體:
供稿:網(wǎng)友

Step1: Group by [ ‘Number’, ‘Date’]

select = ['Number','Date','Fare'] pd.read_Excel('data.xlsx'[select].groupby(['Number','Date']).sum()

Step2: Convert ‘Group by’ into ‘DataFrame’ dataset

# Extract Number, Date, Farel = []for i in Insurance.index: l.append(i)InsuranceT = pd.DataFrame(l)InsuranceT['Fare'] = Insurance.valuesInsuranceT.columns = ['Number', 'Date', 'Fare']# Date --> datetime formatfor i in xrange(len(InsuranceT)): temp = str(InsuranceT.iloc[i,1]) InsuranceT.iloc[i,1] = datetime.strptime(temp,'%Y%m%d')
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 运城市| 安仁县| 于田县| 房产| 仁怀市| 台东市| 永泰县| 宜兰市| 龙泉市| 上犹县| 治县。| 西畴县| 麻江县| 弥勒县| 宁化县| 阿城市| 普安县| 贵定县| 界首市| 阿合奇县| 肥西县| 平谷区| 永春县| 东乡县| 尚义县| 三明市| 商河县| 宿迁市| 修水县| 安化县| 湖州市| 滨海县| 基隆市| 蒙自县| 长乐市| 广河县| 嵊泗县| 上杭县| 九台市| 阿瓦提县| 湖南省|