Mar-19-2024, 08:24 PM
(This post was last modified: Mar-19-2024, 08:24 PM by deanhystad.)
Please post the entire error message, including the traceback. Clean up code before you post. I should not have to read this to find out it doesn't do anything.
cn.head(5) cn['CAND_NAME'].unique() cn['CAND_NAME'].unique().shape cn['CAND_NAME'] = cn['CAND_NAME'].astype(str) cn[cn['CAND_NAME'].str.contains('OBAMA')] cn[cn['CAND_NAME'].str.contains('ROMNEY')] print(cn['CAND_NAME'].dtype)About half the code in your post is similar debugging type code that has no effect on the program execution.