How to create empty pandas DataFrame with same columns and types as existing DataFrame
empty_df = pd.DataFrame(columns=df.columns).astype(df.dtypes)
Full example
import pandas as pd
# Initialize data to lists.
data = {'Name': ['Tom', 'Nick', 'John'],
'Age': [20, 21, 19]}
# Create DataFrame
df = pd.DataFrame(data)
empty_df = pd.DataFrame(columns=df.columns).astype(df.dtypes)