Python Forum
I have this coding exercise to find how much money take Barrack Obama and Romney Mitt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have this coding exercise to find how much money take Barrack Obama and Romney Mitt
#2
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.
Reply


Messages In This Thread
RE: I have this coding exercise to find how much money take Barrack Obama and Romney Mitt - by deanhystad - Mar-19-2024, 08:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Banking system - transferring money 3DEN 2 8,986 Dec-13-2019, 09:13 AM
Last Post: 3DEN
  Money Global Variable saturnstars 8 4,399 Apr-12-2019, 10:48 AM
Last Post: ichabod801
  Money Bags Program PythonNoob123 2 7,856 Jan-23-2017, 10:42 PM
Last Post: PythonNoob123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020