Corey Morris commited on
Commit
b94ee8f
1 Parent(s): 643f05d

for the custom charts, remove columns with NaN values

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -49,6 +49,9 @@ def create_plot(df, arc_column, moral_column, models=None):
49
  if models is not None:
50
  df = df[df.index.isin(models)]
51
 
 
 
 
52
  plot_data = pd.DataFrame({
53
  'Model': df.index,
54
  arc_column: df[arc_column],
 
49
  if models is not None:
50
  df = df[df.index.isin(models)]
51
 
52
+ # remove rows with NaN values
53
+ df = df.dropna(subset=[arc_column, moral_column])
54
+
55
  plot_data = pd.DataFrame({
56
  'Model': df.index,
57
  arc_column: df[arc_column],