How to collapse values of a factor in pandas | Hacker News Reader