Python Forum
trying to understand the python code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trying to understand the python code
#2
1.actualScore will be just the column Score from the dataframe
2.actualScore.map(partition) will apply (i.e. map) function partition to every element of the actualScore, creating positiveNegative
3.filtered_data['Score'] = positiveNegative will replace values from column Score in the dataframe with values from positiveNegative
as a result the dataframe Score column will have just values positive (i.e. original score>=3) and negativee (i.e. original Score<3)
Reply


Messages In This Thread
RE: trying to understand the python code - by buran - Mar-06-2018, 07:45 AM

Forum Jump:

User Panel Messages

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