AI4Finance-Foundation / AI4Finance-Foundation/FinNLP

connection error in dataframe values

未关闭
#22 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.5k
派生
276
PR 合并指标
30 天内没有已合并 PR

描述

run:
```
# Finnhub (Yahoo Finance, Reuters, SeekingAlpha, CNBC...)
from finnlp.data_sources.news.finnhub_date_range import Finnhub_Date_Range

start_date = "2023-01-01"
end_date = "2023-01-03"
config = {
"use_proxy": "us_free", # use proxies to prvent ip blocking
"max_retry": 5,
"proxy_pages": 5,
"token": "clon9npr01qtp8tab4ngclon9npr01qtp8tab4o0" # Available at https://finnhub.io/dashboard
}

news_downloader = Finnhub_Date_Range(config) # init
news_downloader.download_date_range_stock(start_date,end_date) # Download headers
news_downloader.gather_content() # Download contents
df = news_downloader.dataframe
selected_columns = ["headline", "content"]
df[selected_columns].head(10)

# headline content
# 0 My 26-Stock $349k Portfolio Gets A Nice Petrob... Home\nInvesting Strategy\nPortfolio Strategy\n...
# 1 Apple’s Market Cap Slides Below $2 Trillion fo... Error
# 2 US STOCKS-Wall St starts the year with a dip; ... (For a Reuters live blog on U.S., UK and Europ...
# 3 Buy 4 January Dogs Of The Dow, Watch 4 More Home\nDividends\nDividend Quick Picks\nBuy 4 J...
# 4 Apple's stock market value falls below $2 tril... Jan 3 (Reuters) - Apple Inc's \n(AAPL.O)\n sto...
# 5 CORRECTED-UPDATE 1-Apple's stock market value ... Jan 3 (Reuters) - Apple Inc's \n(AAPL.O)\n sto...
# 6 Apple Stock Falls Amid Report Of Product Order... Apple stock got off to a slow start in 2023 as...
# 7 US STOCKS-Wall St starts the year with a dip; ... Summary\nCompanies\nTesla shares plunge on Q4 ...
# 8 More than $1 trillion wiped off value of Apple... apple store\nMore than $1 trillion has been wi...
```
====================================================================
**Error:**
connection error in dataframe values as shown below

![image](https://github.com/AI4Finance-Foundation/FinNLP/assets/61718875/5d7a87a5-27ea-4fac-b530-3fb192a9edfb)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。