i have large data frame around 190000 rows. data frame has label column storing 12 nominal categories. want change weight column value of each row based on label value of row. example, if label of row "res", want change weight field value 0.5 , if "condo", want change weight value 2.
i know easy implement if else statement given number of rows, processing time takes long. wanted use cut() seems cut categorizes based on intervals not nominal categories. appreciate suggestion can decrease processing time.
Comments
Post a Comment