def vectorize(self, df, column_name):
        """Vectorize a column in the dataframe"""
        vec_df = df[column_name].str.join(sep='-').str.get_dummies(sep='-')
        return vec_df
def vectorize ( self , df , column_name ) : vec_df = df [ column_name ] . str . join ( sep = '-' ) . str . get_dummies ( sep = '-' ) return vec_df
Vectorize a column in the dataframe