atreadw1492 / yahoo_fin

Scrape stock price history from new (Spring 2017) Yahoo Finance layout
MIT License
286 stars 125 forks source link

Handle the case where there are earning-report numbers for only one quarter #29

Closed saswatanand closed 3 years ago

saswatanand commented 3 years ago

Usually the first table has more than 2 columns; each column corresponding to a different quarter. But some stocks such as 'arry' there is only 2 columns and that leads to problem.

Because the first table usually has >2 columns, it gets filtered out by the condition shape[1] == 2.

The fix explicitly ignores the first table.

Fixes #28