Mar-06-2018, 07:45 AM
1.actualScore will be just the column
2.
3.
as a result the dataframe Score column will have just values positive (i.e. original score>=3) and negativee (i.e. original Score<3)
Score
from the dataframe2.
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)