Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#1
by
sergiopaniego
HF Staff
- opened
app.py
CHANGED
@@ -57,6 +57,16 @@ df_main = df_orig.select(
|
|
57 |
"paper_id",
|
58 |
)
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
df_main = df_main.rename(
|
61 |
{
|
62 |
"title": "Title",
|
|
|
57 |
"paper_id",
|
58 |
)
|
59 |
|
60 |
+
df_main = df_main.with_columns(
|
61 |
+
[
|
62 |
+
pl.when(pl.col(col) == "").then(None).otherwise(pl.col(col))
|
63 |
+
.cast(pl.Int64)
|
64 |
+
.fill_null(0)
|
65 |
+
.alias(col)
|
66 |
+
for col in ["upvotes", "num_comments"]
|
67 |
+
]
|
68 |
+
)
|
69 |
+
|
70 |
df_main = df_main.rename(
|
71 |
{
|
72 |
"title": "Title",
|