Код: Выделить всё
train, test = df
.with_columns(pl.lit(np.random.rand(df0.height)>0.8).alias('split'))
.partition_by('split')
Подробнее здесь: https://stackoverflow.com/questions/764 ... -dataframe
Код: Выделить всё
train, test = df
.with_columns(pl.lit(np.random.rand(df0.height)>0.8).alias('split'))
.partition_by('split')