美文网首页
2019-04-08 python一些函数总结

2019-04-08 python一些函数总结

作者: 七七biubiu | 来源:发表于2019-04-08 01:37 被阅读0次

query函数

index=df.query('index>200').index (引号为必须)

loc, iloc函数

df.loc[(df['group']=='treatment')!=(df['landing_page']=='new')].count()

df_test=df.loc[~((df['group']=='treatment')!=(df['landing_page']=='new'))]

df_test1.loc[(df_test1.['group']=='treatment')].['converted'].mean()

duplicated, drop_duplicates函数

df_test.loc(df_test['user_id'].duplicated(keep=False))

df_test1=df_test.drop_duplicates('user_id',keep='first')

相关文章

网友评论

      本文标题:2019-04-08 python一些函数总结

      本文链接:https://www.haomeiwen.com/subject/gydyiqtx.html