-1
I’m having a problem in python code, which I’m wanting to import some data that is taken from a website and it matters either for excel or for csv.
as you can see in the photo, this is the data, many columns and rows.
I managed to solve the problem to do that way
for key, value in result.items():
df = pd.DataFrame(result_format.format(key,
value['Cotacao'],
value['P/L'],
value['P/VP'],
...
))
df.to_csv('Dados.csv')
however only one row of this data is taken and all the data is in only the first column of the first row.
And what I wanted to sort out was that each piece of information in the row should be separated by column, how can I solve this.
It worked great, thank you!
– Wesley Israel