Read an Excel workbook in Pandas and reference cells by coordinates
pip install git+https://github.com/pashri/martes
This is it for now.
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.
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.
It's Tuesday
You can contribute with pull requests. Make sure to run pytest and add tests to your new functionality