Skip to main content

Read in an ODS file and return it as a pandas.DataFrame

Project description


Provides a function to read in an ODS file and return a pandas DataFrame.

It uses ezodf to read in the ods file. If a range is specified in the sheet to be imported, it seems that ezodf imports empty cells as well. Therefore, completely empty rows and columns are dropped from the DataFrame, before it is returned. Only trailing empty rows and columns are dropped.


  • ezodf
  • lxml
  • pandas


pip install pandas_read_ods


from pandas_ods_reader import read_ods

path = "path/to/file.ods"

# load a sheet based on its index (1 based)
sheet_idx = 1
df = read_ods(path, sheet_idx)

# load a sheet based on its name
sheet_name = "sheet1"
df = read_ods(path, sheet_name)

# load a file that does not contain a header row
# if no columns are provided, they will be numbered
df = read_ods(path, 1, headers=False)

# load a file and provide custom column names
# if headers is True (the default), the header row will be overwritten
df = read_ods(path, 1, columns=["A", "B", "C"])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pandas_ods_reader-0.0.6-py3-none-any.whl (6.6 kB) Copy SHA256 hash SHA256 Wheel py3
pandas_ods_reader-0.0.6.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page