faizhalas commited on
Commit
34db5c9
1 Parent(s): 641920f

support csv from lens.org

Browse files
Files changed (1) hide show
  1. pages/4 Sunburst.py +3 -1
pages/4 Sunburst.py CHANGED
@@ -27,8 +27,10 @@ def get_ext(extype):
27
  @st.cache_data(ttl=3600)
28
  def upload(extype):
29
  papers = pd.read_csv(uploaded_file)
 
30
  if 'Publication Year' in papers.columns:
31
- papers.rename(columns={'Publication Year': 'Year'}, inplace=True)
 
32
  return papers
33
 
34
  @st.cache_data(ttl=3600)
 
27
  @st.cache_data(ttl=3600)
28
  def upload(extype):
29
  papers = pd.read_csv(uploaded_file)
30
+ #lens.org
31
  if 'Publication Year' in papers.columns:
32
+ papers.rename(columns={'Publication Year': 'Year', 'Citing Works Count': 'Cited by',
33
+ 'Publication Type': 'Document Type', 'Source Title': 'Source title'}, inplace=True)
34
  return papers
35
 
36
  @st.cache_data(ttl=3600)