append pandas dataframe automatically cast as float but want int
It's because your initial dataframe is empty. Initialize it with some integer column.
df = pd.DataFrame(dict(A=[], test=[], another=[]), dtype=int)
df.append(dict(A=3, test=4, another=5), ignore_index=True)
Had I done
df = pd.DataFrame()
df.append(dict(A=3, test=4, another=5), ignore_index=True)