Skip to content
/ martes Public

Read an excel workbook in Pandas and reference cells by coordinates

License

Notifications You must be signed in to change notification settings

pashri/martes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Martes

Read an Excel workbook in Pandas and reference cells by coordinates

Installation

pip install git+https://github.com/pashri/martes

Documentation

This is it for now.

Overview

Martes is an extension onto pandas meant to allow access to DataFrame slices by their Excel Coordinates. It's good for reading in data from Excel. It's not good for saving data to Excel.

How to use it

You can load the extension like this:

from martes import PandasWorkbook

You can load your workbook like this:

workbook = PandasWorkbook(filepath)

See your worksheets like this:

print(workbook.sheets)  # Returns a list of sheet names

Access a sheet like this:

addresses_df = workbook['Addresses']

And access data from the worksheet like this:

workbook['Addresses'].xl['A2']
workbook['Addresses'].xl['A2:G50']
workbook['Addresses'].xl['A:A']
workbook['Addresses!A2']
workbook['Addresses!A2:G50']
workbook['Addresses!A:A']

It will always return a DataFrame for a range, and a single cell's value for a cell.

Why Martes?

It's Tuesday

Contributing

You can contribute with pull requests. Make sure to run pytest and add tests to your new functionality

About

Read an excel workbook in Pandas and reference cells by coordinates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages