1.get_dummies()pandas.get_dummies(data,prefix=None,prefix_sep='_',dummy_na=False,columns=None,sparse=False,drop_first=False):Convertcategoricalvariableintodummy/indicatorvariables>>>importpandasaspd>>>s=pd.Series(list('abca'))>>>pd.get_dummies(s)abc01001010200131002.pd.factorize()pandas.factorize(values,sort=False,order=None,na_sentinel=-1,size_...
继续阅读 >