I am trying to get the count of Age
column and append it to my existing bin-range column created. I am able to do it for the training df
and want to do it for prediction data. How do I map values of count of Age
column from prediction data to to Age_bin
column in my training data? The first one is my output DF
whereas the 2nd one is the sample DF
. I can get the count using value_counts()
for the file I am reading.
- First image - bin and count from training data
- Second image - Training data
- Third image - Prediction data
- Fourth image - Final output