Metadata-Version: 2.5
Name: oj
Version: 0.0.5
Summary: Reading excel (but more than just cell values: Also colors
Project-URL: Homepage, https://github.com/t-c-w/oj
Project-URL: Repository, https://github.com/t-c-w/oj
Author: t-c-w
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: colors,excel,openpyxl,spreadsheet,xlsx
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: pandas
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# oj
Reading excel (but more than just cell values: Also colors

To install:	```pip install oj```

## Overview
The `oj` package provides advanced functionalities for reading Excel files using Python, focusing not only on cell values but also on extracting and manipulating cell styles, colors, and formats. It utilizes libraries such as `pandas`, `numpy`, and `openpyxl` to handle and process Excel files in a more detailed manner.

## Features
- **Loading Excel Sheets**: Load specific sheets from Excel files with ease.
- **Style Extraction**: Extract styles from cells including fonts, fills, borders, and more.
- **Data Manipulation**: Functions to manipulate and filter data based on cell values and styles.
- **Integration with Pandas**: Seamlessly convert Excel data into pandas DataFrames with additional style information.

## Installation
To install the package, use the following pip command:
```bash
pip install oj
```

## Usage

### Loading and Reading Excel Sheets
To load an Excel sheet and read data:
```python
from oj import get_sheet_data

# Load a specific sheet from the Excel file
sheet = get_sheet_data('path_to_file.xlsx', 'Sheet1')
```

### Extracting All Cell Styles
To extract styles from all cells in a given sheet:
```python
from oj import extract_all_cell_styles

# Assuming 'sheet' is already loaded
styles_df = extract_all_cell_styles(sheet)
print(styles_df.head())
```

### Appending Styles to DataFrame
To append style information to an existing DataFrame:
```python
from oj import append_styles_to_dataframe

# Assuming 'sheet' is loaded and 'df' is a DataFrame with coordinates
styled_df = append_styles_to_dataframe(sheet, df)
print(styled_df)
```

### Filtering DataFrame by Value and Style
To filter a DataFrame based on cell values and specific style properties:
```python
from oj import filter_df_by_value_and_style

# Create a sample DataFrame
df = pd.DataFrame({
    'coordinate': ['A1', 'A2'],
    'value': ['Hello', 'World'],
    'font': ['Arial', 'Calibri'],
    'fill': ['Yellow', 'Blue']
})

# Filter by value and font style
filtered_df = filter_df_by_value_and_style(df, value='Hello', style_property='font', style_value='Arial')
print(filtered_df)
```

## Documentation
Each function in the `oj` package is documented with docstrings, providing a clear description of its functionality, parameters, and usage examples. This ensures ease of use and understanding of the available methods.

## Contributing
Contributions to the `oj` package are welcome. Please ensure that any pull requests or issues are clear and provide sufficient information for review.