Python Forum
How to map character to integer in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to map character to integer in python
#1
suppose we have one csv file containing 2*2 matrix like
Name Age Problem
Rajeev 30 Y
Kumar 32 N
Madan 31 Y
I want to convert Y to 1 and N to 0 into csv file by using python.
Reply


Messages In This Thread
How to map character to integer in python - by rajeev1729 - Oct-02-2017, 01:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python rule about the space character surrounding the equal sign ineuw 10 1,627 Sep-21-2023, 09:17 AM
Last Post: ineuw
  How do I handle escape character in parameter arguments in Python? JKR 6 1,147 Sep-12-2023, 03:00 AM
Last Post: Apoed2023
  [solved] unexpected character after line continuation character paul18fr 4 3,404 Jun-22-2021, 03:22 PM
Last Post: deanhystad
  python error: bad character range \|-t at position 12 faustineaiden 0 3,691 May-28-2021, 09:38 AM
Last Post: faustineaiden
  Question about change hex string to integer sting in the list (python 2.7) lzfneu 1 2,527 May-24-2021, 08:48 AM
Last Post: bowlofred
  Reducing JSON character count in Python for a Twitter Bot johnmitchell85 2 52,513 Apr-28-2021, 06:08 PM
Last Post: johnmitchell85
  SyntaxError: unexpected character after line continuation character siteshkumar 2 3,180 Jul-13-2020, 07:05 PM
Last Post: snippsat
  Help ANSI character and python... sid4g 2 2,420 Mar-19-2020, 06:08 PM
Last Post: sid4g
  how can i handle "expected a character " type error , when I input no character vivekagrey 2 2,741 Jan-05-2020, 11:50 AM
Last Post: vivekagrey
  Beginner at Python. Trying to count certain integer from random string of code kiaspelleditwrong 3 2,413 Oct-14-2019, 10:40 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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