atreadw1492 / yahoo_fin

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

get_quote_table -> error 'DataFrame' object has no attribute 'append' #110

Open sinianzhiren opened 1 year ago

sinianzhiren commented 1 year ago

site = "https://finance.yahoo.com/quote/" + ticker + "?p=" + ticker

tables = pd.read_html(requests.get(site, headers=headers).text)

data = tables[0].append(tables[1])

data.columns = ["attribute" , "value"]

May I ask why an error was reported? Is it a Pandas version issue

dubilyer commented 1 year ago

same here :/ as a workaround I downgrade pandas version: pip install --force-reinstall -v "pandas==1.5.3

lidanielm commented 10 months ago

I believe pandas as deprecated DataFrame.append and Series.append and recommend pandas.concat instead.