df = pd.DataFrame({'cat': ['a', 'b', 'c', 'd'], 'val': [1, 2, 5, 10]})
df1 = pd.get_dummies(pd.DataFrame({'cat': ['a'], 'val': [1]}))
Easy way to apply transformation from `pandas.get_dummies` to new data?