Metadata-Version: 2.4
Name: minimindslab-csv-cell-trim
Version: 0.1.0
Summary: Trim leading and trailing whitespace from every cell in CSV-like row data while preserving row structure and quoted empty fields.
Author: MiniMindsLab
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab CSV Cell Trim

`minimindslab-csv-cell-trim` is a small, pure-Python utility for trimming leading and trailing whitespace from every **string cell** in CSV-like row data.

It is designed for pre-cleaning small CSV exports before joins, comparisons, deduplication, or spreadsheet loading.

## Features

- Trims whitespace on all string cells.
- Preserves non-string values unchanged.
- Preserves row and column structure exactly.
- Returns a new data structure (does not mutate input).
- Standard library only.

## Installation

```bash
pip install minimindslab-csv-cell-trim
```

## Usage

```python
from minimindslab_csv_cell_trim import trim_csv_cells

rows = [
    ["  alpha ", " beta", ""],
    [" 42 ", 42, None],
]

cleaned = trim_csv_cells(rows)

# cleaned:
# [
#   ["alpha", "beta", ""],
#   ["42", 42, None],
# ]
```

## API

### `trim_csv_cells(rows)`

- **rows**: sequence of row sequences (e.g., list of lists / tuples)
- **returns**: `list[list[object]]`

Raises:
- `TypeError` if `rows` is not a sequence of rows or any row is not a sequence.
- `TypeError` if any row is a `str`/`bytes` object.

## License

MIT
