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
  SyntaxError: unexpected character after line continuation character siteshkumar 2 304 Jul-13-2020, 07:05 PM
Last Post: snippsat
  Help ANSI character and python... sid4g 2 399 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 547 Jan-05-2020, 11:50 AM
Last Post: vivekagrey
  python cache for small integer Uchikago 1 760 Jun-27-2019, 05:32 PM
Last Post: ichabod801
  Error when entering letter/character instead of number/integer helplessnoobb 2 752 Jun-22-2019, 07:15 AM
Last Post: ThomasL
  Replace changing string including uppercase character with lowercase character silfer 11 1,674 Mar-25-2019, 12:54 PM
Last Post: silfer
  how to add a coma in print statement of python without preceding space character? brittocj 3 899 Sep-27-2018, 09:03 PM
Last Post: nilamo
  Python function that uses a word as the encryption key, rather than an integer wak_stephanie 4 1,724 Aug-31-2018, 12:16 PM
Last Post: perfringo
  How to sum up the elements of an integer using python split/join? mohanraj1986 5 1,100 Aug-27-2018, 09:13 AM
Last Post: perfringo
  How to convert character to integer in python rajeev1729 2 1,737 Oct-03-2017, 04:30 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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