Skip to content

Conversation

@difelice
Copy link
Contributor

@difelice difelice commented Sep 1, 2023

Issue

Retrieving quotes by indexes but not using pandas iloc method, which show a warning:

FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  if not _np.isnan(quotes["High"][n - 1]):

Changes

  • Modified yfinance/utils.py to fix an issue with retrieving live data from Yahoo Finance.
  • Replaced the use of square brackets with the iloc method to access specific elements in the DataFrame.
  • Updated the code to use iloc instead of indexing with column names.

@difelice difelice changed the base branch from main to dev September 1, 2023 19:06
@difelice difelice marked this pull request as ready for review September 1, 2023 19:08
@ValueRaider ValueRaider merged commit 6cae6d4 into ranaroussi:dev Sep 1, 2023
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

Successfully merging this pull request may close these issues.

2 participants