Home > other >  TypeError: the object of type "int" has no len () error
TypeError: the object of type "int" has no len () error

Time:11-03


Run data=https://bbs.csdn.net/topics/pd.concat ([data, eventdf], axis=1)
TypeError: the object of type "int" has no len () error
How to solve? Pray god guide!!!!!!

CodePudding user response:

Should be a data type mismatch, the complete code is needed to determine

CodePudding user response:

Df1=pd. Read_csv (' E://data/log_trainData KDD2015 raw data set. The CSV ')
Gp=df1. Groupby (" enrollment_id ")
Data=https://bbs.csdn.net/topics/df1.pivot_table (" source ", the index='enrollment_id', the columns="event", aggfunc='count', fill_value=https://bbs.csdn.net/topics/0)
Eventdf=gp. Event. The describe () unstack ()
Data=https://bbs.csdn.net/topics/pd.concat ([data, eventdf], axis=1)
This is the code
  • Related