On 15Jan2022 02:38, NArshad <narshad....@gmail.com> wrote:
>Why does the code written below is not giving any output?
>
>    xls = ExcelFile('ABC.xlsx')
>    df = xls.parse(xls.sheet_names[0], index_col=1)
>    x=df.to_dict()
>    print (x)
>
>Only the contents of the first column and the column number is required 
>in the dictionary

The code above _must_ produce some output, even if it is very short, or 
an error traceback. Is "x" an empty dictionary? Are you getting an 
exception? What is in ABC.xlsx, at least in part? What modules are you 
importing in order to get the name "ExcelFile"? I'm guessing pandas, but 
that is from a web search.

Cheers,
Cameron Simpson <c...@cskk.id.au>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to