Skip to content
Advertisement

How to convert Excel file to json using pandas?

I would like to parse Excel file which has a couple of sheets and save a data in JSON file.

I don’t want to parse first and second sheet, and also the last one. I want to parse those in between and that number of sheets is not always equal and names of those sheets are not always the same.

JavaScript

Is there a way not to put this parameter sheet_name?

JavaScript

Advertisement

Answer

I would just create a sheet level dict and loop through each of the sheets. Something like this:

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