A default dtype of DataFrame index is int64 and I would like to change it to int32.
int64
int32
I tried changing it with pd.DataFrame.set_index and Num
Not sure this is something worth doing in practice, but the following should work:
class Int32Index(pd.Int64Index): _default_dtype = np.int32 @property def asi8(self): return self.values i = Int32Index(np.array([...], dtype='int32'))
(from here)