AI4Finance-Foundation / AI4Finance-Foundation/FinNLP

connection error in dataframe values

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.5k
Forks
276
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.