0
I’m trying to extract some data and write to an excel file. However, they come with a Shape=(1,209,26) which generates the following error when trying to pass to the . xlsx "Valueerror: Must pass 2-d input. Shape=(1, 209, 26)". How to turn it into a 2d data frame?
import requests
import pandas as pd
url = "https://www.fundsexplorer.com.br/ranking"
header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
dfs = pd.read_html(r.text)
dfs = pd.DataFrame(dfs)
Diego, please reread your question and see if it makes any sense. I recommend to go to [help], read the [Ask] guide and analyze how to mount a [mcve].
– Woss