How to convert OpenDocument spreadsheets to a pandas DataFrame?

前端 未结 11 1618
日久生厌
日久生厌 2020-12-23 19:40

The Python library pandas can read Excel spreadsheets and convert them to a pandas.DataFrame with pandas.read_excel(file) command. Under the hood,

11条回答
  •  甜味超标
    2020-12-23 20:05

    If you only have a few .ods files to read, I would just open it in openoffice and save it as an excel file. If you have a lot of files, you could use the unoconv command in Linux to convert the .ods files to .xls programmatically (with bash)

    Then it's really easy to read it in with pd.read_excel('filename.xls')

提交回复
热议问题