Initalize With DataType

import numpy as np
import pandas as pd
df = pd.DataFrame({'a': [7, 1, 5], 'b': ['3','2','1']}, dtype='object')
df
a b
0 7 3
1 1 2
2 5 1
df.dtypes
a    object
b    object
dtype: object
# Let's set the datatype as integer
df1 = pd.DataFrame({'a': [7, 1, 5], 'b': ['3','2','1']}, dtype='int')
/Users/rajacsp/anaconda3/envs/py36/lib/python3.6/site-packages/numpy/core/numeric.py:2591: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  return bool(asarray(a1 == a2).all())
df1
a b
0 7 3
1 1 2
2 5 1
type(df1)
pandas.core.frame.DataFrame
df1.dtypes
a    int64
b    int64
dtype: object