Update app.py
Browse files
app.py
CHANGED
|
@@ -448,9 +448,11 @@ def server(input, output, session):
|
|
| 448 |
}))
|
| 449 |
|
| 450 |
brushed_df_final.with_columns(
|
| 451 |
-
pl.
|
| 452 |
-
.
|
| 453 |
-
.
|
|
|
|
|
|
|
| 454 |
.alias("Spin")
|
| 455 |
)
|
| 456 |
|
|
|
|
| 448 |
}))
|
| 449 |
|
| 450 |
brushed_df_final.with_columns(
|
| 451 |
+
pl.col("Spin")
|
| 452 |
+
.cast(pl.Float64, strict=False) # Convert strings to floats, invalid parsing becomes null
|
| 453 |
+
.fill_nan(None) # Convert NaNs to null
|
| 454 |
+
.fill_null(0) # Replace nulls with 0
|
| 455 |
+
.round(0) # Round the valid numeric values
|
| 456 |
.alias("Spin")
|
| 457 |
)
|
| 458 |
|