Closed
Description
It seems that DataFrame (both constructor and astype
) promotes the dtypes np.int[8,16,32] to np.int64 ::
>>> pd.DataFrame(data=np.ones((10, 2), dtype=np.int32), dtype=np.int32).get_dtype_counts()
int64 2
I'm not sure whether this is a but or on purpose (if so, a note in the docstring would be great).
Is there a specific reason why this is the case (e.g. to accomodate NA values?). If there are no NA's in the frame, can the promotion be turned off?