Skip to content
Advertisement

Pandas To_Excel parsing problem – outputting only 1 file

Hello I have working code like this:

JavaScript

Problem is: If I leave it like this it only outputs for first if. When I comment out that if section it will successfully output elif, but I can’t get it to output 2 files whatever I do. Any ideas?

Error I’m getting for Acryptos:

JavaScript

But if I comment out Autofarm and just process if for Acryptos is outputs excel just fine.

Advertisement

Answer

please remove the below line from your code

JavaScript

debug code:

JavaScript

you have initially created

df_json = json_normalize(data)

and also in loop, you are overwriting it –>

JavaScript

so change the name in loop and it will be okay.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement