TypeError: int() argument must be a string, a bytes-like object or a real number, not…
- User
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Expr'
def add_features(df): df_clone = df.clone() df_clone = df_clone.with_columns([
code# Разница в трофеях (pl.col("player_1_trophies") - pl.col("player_2_trophies")).alias("trophy_diff"), # Среднее арифметическое трофеев ((pl.col("player_1_trophies") + pl.col("player_2_trophies")) / 2).alias("avg_trophies"), # Первый игрок имеет больше корон хотя бы на 30 int((pl.col("player_1_trophies") - pl.col("player_2_trophies")) >= 30).alias("is_first_better"), # Второй игрок имеет больше корон хотя бы на 30 int((pl.col("player_2_trophies") - pl.col("player_1_trophies")) >= 30).alias("is_second_better") ]) return df_clone Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.