The other day, I was grabbing a way-too-big DB query for local exploration. It was literally over 2GB as a CSV - which is a pain for a number of reasons! Not the least of which being that, while you're doing Exploratory Data Analysis, things take way too long - it doesn't take long for Cognitive Drift to break your rhythm!
Numerical columns can be taken down to size with the downcasting functions from a previous post. But what about Object/String columns? One of the best ways to reduce the size of a file like this is to recast