Python Forum
NPL function: data cleaning a variables' categories
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPL function: data cleaning a variables' categories
#1
I am looking for the right NPL function to use. Current situation:
My variable "Registration" should have two categories, namely 0 (no) and 1 (yes).
However, the data of this variable is currently distributed among 4 categories; namely:

0 220
1 132
yes 93
si 82

Therefore, I want to use a NPL function in which I can move the data in "yes" and "si" to "1".
In order words, I want to be left with:

0 220
1 307 (as 132+93+82)

Can someone help me? Thanks!

Please delete this thread.
Reply
#2
what is NPL?
see: https://python-forum.io/misc.php?action=help&hid=21
Please explain as many readers (including myself) may not know what NPL stands for.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Data Cleaning with PyHive PythonSpeaker 2 3,420 Nov-16-2019, 10:30 AM
Last Post: PythonSpeaker

Forum Jump:

User Panel Messages

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