Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i Food_group
- 0 Flake
- 1 Flake
- 2 Flake
- 3 Almond
- 4 Drink
- 5 Drink
- 6 Flake
- data["food_group"] = data.food_group.apply(lambda x: "other" if x.value_counts()==1 else x)
- AttributeError: 'str' object has no attribute 'value_counts'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement