Skip to content

Instantly share code, notes, and snippets.

@rodrigobercini
Created March 20, 2021 13:41
Show Gist options
  • Save rodrigobercini/59ffa3f1c37274c42bc918faa158ac88 to your computer and use it in GitHub Desktop.
Save rodrigobercini/59ffa3f1c37274c42bc918faa158ac88 to your computer and use it in GitHub Desktop.
Como achar a última data ex dividendos com Yahoo Query
from yahooquery import Ticker
petr = Ticker('PETR4.SA')
df = petr.history(period='max')
df.reset_index(inplace=True)
df[df['close'] != df['adjclose']].tail(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment