Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with get_day_gainers() #109

Open
getsharmagunjan opened this issue Jul 20, 2023 · 1 comment
Open

Issue with get_day_gainers() #109

getsharmagunjan opened this issue Jul 20, 2023 · 1 comment

Comments

@getsharmagunjan
Copy link

Hi,

I want to get Day's Gainers for NSE market (India). But get_day_gainers() returns data for US market only. (Alothough get_analysts_info("RELIANCE.NS") works fine)

Is there any way I can get Day's gainers for NSE Market only?

@StephanAkkerman
Copy link

There is another issue with get_day_gainers() at the moment

File "D:\Anaconda\envs\discord\lib\site-packages\yahoo_fin\stock_info.py", line 620, in get_day_gainers
    return _raw_get_daily_info(f"https://finance.yahoo.com/gainers?offset=0&count={count}")
  File "D:\Anaconda\envs\discord\lib\site-packages\yahoo_fin\stock_info.py", line 606, in _raw_get_daily_info
    df[field] = df[field].map(_convert_to_numeric)
  File "C:\Users\Stephan\AppData\Roaming\Python\Python310\site-packages\pandas\core\series.py", line 4540, in map
    new_values = self._map_values(arg, na_action=na_action)
  File "C:\Users\Stephan\AppData\Roaming\Python\Python310\site-packages\pandas\core\base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
  File "C:\Users\Stephan\AppData\Roaming\Python\Python310\site-packages\pandas\core\algorithms.py", line 1814, in map_array
    return lib.map_infer(values, mapper, convert=convert)
  File "lib.pyx", line 2920, in pandas._libs.lib.map_infer
  File "D:\Anaconda\envs\discord\lib\site-packages\yahoo_fin\stock_info.py", line 55, in _convert_to_numeric
    if "M" in s:
TypeError: argument of type 'float' is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants