Probably obvious, but just wanted to confirm:
What would be the best suited data type for a numerical ID in pandas?
Let's say that I have a sequential numerical ID type user_id, which would be better:
- an
int64type (that would seem to be the most obvious choice given the numerical representation of the field) - a
categorytype (which might make more sense, given that the ID is not to be used for actual numerical operations, but rather as a unique identifier)
Same question for characters-based IDs, would it be better to use an object or a category type?
I would be tempted to use the category data type (thinking there might be performance benefits, as I would imagine these categories are somehow optimised/hashed/indexed for performance), but I was wondering whether this data type is more suited for a more limited subset of distinct values than the possible 100's of thousands unique user_ids I might have in my dataset.
Thanks!