FDSRashid commited on
Commit
7d83cce
·
1 Parent(s): 144d5a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -50,8 +50,8 @@ def get_narrators( city , year1, year2):
50
  df = subset_city_year(city, year1, year2)
51
  narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
52
  fixed = splitIsnad(narrators)
53
- fixed['Teacher Reports'] = fixed['Teacher_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x].loc[1, 'Number of Narrations'])
54
- fixed['Student Reports'] = fixed['Student_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x].loc[1, 'Number of Narrations'])
55
  return fixed[['Teacher', 'Student', 'Teacher Reports', 'Student Reports']]
56
  except Exception as e:
57
  return str(e)
 
50
  df = subset_city_year(city, year1, year2)
51
  narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
52
  fixed = splitIsnad(narrators)
53
+ fixed['Teacher Reports'] = fixed['Teacher_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]['Number of Narrations'].to_list()[0])
54
+ fixed['Student Reports'] = fixed['Student_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]['Number of Narrations'].to_list()[0])
55
  return fixed[['Teacher', 'Student', 'Teacher Reports', 'Student Reports']]
56
  except Exception as e:
57
  return str(e)