OxbridgeEconomics commited on
Commit
ba224f2
·
unverified ·
1 Parent(s): 7381b78

Update vectorizer.py

Browse files
Files changed (1) hide show
  1. controllers/vectorizer.py +2 -2
controllers/vectorizer.py CHANGED
@@ -36,8 +36,8 @@ def vectorize(article):
36
  Returns:
37
  None
38
  """
39
- article['id'] = str(article['id'], index=[0])
40
- df = pd.DataFrame(article)
41
  df = df[['id','site','title','titleCN','category','author','content',
42
  'publishDate','link','attachment','sentimentScore','sentimentLabel']]
43
  df['sentimentScore'] = df['sentimentScore'].round(2)
 
36
  Returns:
37
  None
38
  """
39
+ article['id'] = str(article['id'])
40
+ df = pd.DataFrame(article, index=[0])
41
  df = df[['id','site','title','titleCN','category','author','content',
42
  'publishDate','link','attachment','sentimentScore','sentimentLabel']]
43
  df['sentimentScore'] = df['sentimentScore'].round(2)