Kaggle
learn_forlife
learn for life
展开
-
X和Y为不同函数关系时pd.corr()的输出结果
from pandas import DataFrame,Series import pandas as pd import numpy as np import math 当X和Y为log()关系时: @python x=Series(np.arange(1,20)) y=x.apply(lambda x:math.log2(x)) conc=pd.concat([x,y],axis原创 2018-01-12 09:40:04 · 3390 阅读 · 0 评论 -
groupby.agg('sum).reset_index()妙用
@python data Out[22]: data key1 key2 0 1 a one 1 2 a two 2 3 b one 3 4 c three 4 5 c one data.groupby(['key1','key2']).agg('sum').reset_index() O...原创 2018-05-31 22:55:41 · 6129 阅读 · 0 评论