79412415

Date: 2025-02-04 16:45:56
Score: 0.5
Natty:
Report link

Just do subsets specifying the condition using the column rank_group:

import pandas as pd
df = pd.DataFrame({'rank_group':[1,1,2,2,2,2,3,3,3,4,4,4,5,5,6,6,6,7,7,8,8,8]})

train, validation, test = df[df['rank_group'] <6], df[df['rank_group'].isin([6,7])], df[df['rank_group'] >7]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: brenodacosta