Spaces:
Running
Running
applymap to map in pandas function
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ df = df.sort_values(by='Total Usage', ascending=False)
|
|
39 |
sum_all_author = naturalsize(sum(df['models'].tolist()+df['datasets'].tolist()+df['spaces'].tolist()))
|
40 |
|
41 |
naturalsize_columns = ['Total Usage', 'models', 'datasets', 'spaces']
|
42 |
-
df[naturalsize_columns] = df[naturalsize_columns].
|
43 |
|
44 |
df['Serial Number'] = [i for i in range(1, len(df)+1)]
|
45 |
df = df[['Serial Number', "author", "Total Usage", "models", "datasets", "spaces"]]
|
|
|
39 |
sum_all_author = naturalsize(sum(df['models'].tolist()+df['datasets'].tolist()+df['spaces'].tolist()))
|
40 |
|
41 |
naturalsize_columns = ['Total Usage', 'models', 'datasets', 'spaces']
|
42 |
+
df[naturalsize_columns] = df[naturalsize_columns].map(naturalsize)
|
43 |
|
44 |
df['Serial Number'] = [i for i in range(1, len(df)+1)]
|
45 |
df = df[['Serial Number', "author", "Total Usage", "models", "datasets", "spaces"]]
|