美文网首页简友广场
python错误:TypeError: pivot_table(

python错误:TypeError: pivot_table(

作者: 一只不会南飞的燕 | 来源:发表于2020-04-23 20:18 被阅读0次

data = df1.pivot_table("source",rows='enrollment_id',cols="event",aggfunc='count',fill_value=0)

运行上述代码时总是出现TypeError: pivot_table() got an unexpected keyword argument 'rows'的错误。修改办法是rows改成index,cols写成全名”columns”

data = df1.pivot_table("source",index='enrollment_id',columns="event",aggfunc='count',fill_value=0)


我是一只不会南飞的燕!大家一起学习,一起进步!

相关文章

网友评论

    本文标题:python错误:TypeError: pivot_table(

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