python - Pandas loc find user that has applied to 5 or more things -
i want know users have fullcategory of length greater 5.
i have data frame called users_df looks this
userid fullcategory 1 [1,2,3,4,5] 2 [1,2,,5] 3. [1,4,5]
i trying this.
users_df.loc[len(users_df.fullcategory) > 5, :]
but doesn't seem work
try this:
users_df.loc[users_df.fullcategory.str.len() > 5]
Comments
Post a Comment