1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Convert excel file (.xlsx) to json

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    I have a xlsx file

    Country name Country code
    IN India
    SL Sri Lanka

    I want to convert this to a json in the format

    json = {
    {"Name":"India",
    "Code":"IN"},
    {"Name":"Sri Lanka",
    "Code":"SL"}
    }



    I tried load the excel file using the pandas and convert them to json but i am getting

    json = {
    "India":"IN",
    "Sri Lanka":"SL"
    }

    Continue reading...

Compartilhe esta Página