are d matrices and get dummies ared similar code example Example: how to get dummies in a dataframe pandas df = pd.get_dummies(df, columns=['type'])