Live data from Hacker News

Loading Data into Pandas: Tips and Tricks You May or May Not Know

dataground.io

11–12 of 12 posts

Re: Loading Data into Pandas: Tips and Tricks You May or May Not Know

#11
My tip is to keep a dict of all the fields and the data types you expect them to be, particularly strings. In my company we have IDs that start with zeros, or are a mix of numbers and letters, and get interpreted as numeric types. I'm frequently pulling data out of the DW with the same fields, so I just have to use the dtype= arg point it to my dict and it takes care of that for me.
Post reply on HN