I would like to read in a dataframe using read_csv. For example:
data = pd.read_csv("foo.txt", sep=' ', header=None, dtype={0:np.uint32, 1:np.uint32, 2:np.str})
Except foo.txt has the awkward property that the first two columns are in hex. E.g
ff462 44e44 house
You can convert a hex value to an int with int("ff462", 16)
. How can I read in the data making sure that the first two columns are converted to dtype uint32?