Michael Yuan commited on
Commit
524b2aa
·
1 Parent(s): 4911f37

Free user placeholder processing moved to server-side

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,13 +11,13 @@ USER_BLACKLIST = ["gdm", "necl", "ncel", "root"]
11
 
12
 
13
  def get_plot_df(df):
14
- df = df.fillna({"fan_speed": "N/A", "users": ""})
15
 
16
  df["users"] = df["users"].str.split(",")
17
 
18
- # Clean users list with "Free" as the empty placeholder value
19
  df["users"] = df["users"].apply(
20
- lambda user_list: [u for u in user_list if u and u not in USER_BLACKLIST] or ["Free"]
21
  )
22
 
23
  # Construct a new DataFrame for the bar chart
 
11
 
12
 
13
  def get_plot_df(df):
14
+ df = df.fillna({"fan_speed": "N/A"})
15
 
16
  df["users"] = df["users"].str.split(",")
17
 
18
+ # Filter out blacklisted users
19
  df["users"] = df["users"].apply(
20
+ lambda user_list: [u for u in user_list if u not in USER_BLACKLIST]
21
  )
22
 
23
  # Construct a new DataFrame for the bar chart