I am using Python 3.8 and Pandas 1.3. Here is some sample code:
data_dc = {'Dates': ['10212021','11152021','01142022','02122022']}
df1 = pd.DataFrame(data_dc)
print(df1['Dates'].astype(int))
Results:
0 10212021
1 11152021
2 1142022
3 2122022
Name: Dates, dtype: int32
I specified a Python data type (int) as the argument of the astype method and expected a dtype of the Dates column to be int64. Instead, I got int32. Is this a bug or am I doing something wrong? This is easy to work around, but I like to make sure I understand what to expect from the software.