Switching from Pandas to standard data structures