Resolved: Dummy variable not converting to Zero's and Ones
Please why am I getting boolean values of false and true instead of zeros and ones
Thanks for reaching out.
Can you please check the contents of the 'Reason for Absence' column prior to applying the
.get_dummies() method? It seems that there's the key to this outcome.
Hope this helps but please feel free to get back to us should you need further assistance. Thank you!
Hi Martin, these were the steps I followed in line with the lectures before get_dummies, can you help identify the issue
And then after the error above, i get
so what caused the error above, yet reason_columns gave an output?
try the code below in order to get 0 and 1 instead of True and False
reason_columns = pd.get_dummies(df['Reason for Absence'] ,dtype=int)