Answers for "getting dummies for a column in pandas dataframe"

3

getting dummies for a column in pandas dataframe

note:
dummies = pd.get_dummies(df[['column_1']], drop_first=True)

note:for more that one coloum keep ading in the list 
dummies = pd.get_dummies(df[['column_1', 'column_2','column_3']], drop_first=True)
Posted by: Guest on May-11-2020

Code answers related to "getting dummies for a column in pandas dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language