code: def dummy(DF, cols=None):
  	
  	dummies = (get_dummies(DF[col]) for col in 
  		(DF.columns if cols is None else cols))
  	return concat(dummies, axis=1, keys=DF.columns)
docs: Dummy code select columns of a DataFrame.