Weyaxi commited on
Commit
c38f61a
·
verified ·
1 Parent(s): f9a5a8a

applymap to map in pandas function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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].applymap(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"]]
 
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"]]