Eleonora Bernasconi commited on
Commit
bb43809
·
1 Parent(s): 0c2dd57

Update analysis.py

Browse files
Files changed (1) hide show
  1. analysis.py +11 -2
analysis.py CHANGED
@@ -89,13 +89,22 @@ def main():
89
  # Separate authors and calculate citations for each author
90
  author_citation_counts = pd.DataFrame(columns=['Authors', citation_source])
91
 
 
 
92
  for _, row in top_authors.iterrows():
93
  authors = row['Authors'].split(', ')
94
  citations = row[citation_source]
95
 
96
  for author in authors:
97
- author_citation_counts = author_citation_counts.append(
98
- {'Author': author, 'Total Citations': citations}, ignore_index=True)
 
 
 
 
 
 
 
99
 
100
  # Group by author and sum the citations
101
  author_citation_totals = author_citation_counts.groupby(
 
89
  # Separate authors and calculate citations for each author
90
  author_citation_counts = pd.DataFrame(columns=['Authors', citation_source])
91
 
92
+ rows_to_concat = []
93
+
94
  for _, row in top_authors.iterrows():
95
  authors = row['Authors'].split(', ')
96
  citations = row[citation_source]
97
 
98
  for author in authors:
99
+ rows_to_concat.append({'Author': author, 'Total Citations': citations})
100
+
101
+ author_citation_counts = pd.concat([author_citation_counts, pd.DataFrame(rows_to_concat)], ignore_index=True)
102
+
103
+
104
+
105
+
106
+
107
+
108
 
109
  # Group by author and sum the citations
110
  author_citation_totals = author_citation_counts.groupby(