ToucanToco / fastexcel

A Python wrapper around calamine
http://fastexcel.toucantoco.dev/
MIT License
82 stars 4 forks source link

feat: support callable in use_columns parameter #240

Closed julio-34727 closed 6 days ago

julio-34727 commented 2 weeks ago

Hi,

Is it possible to support a callable in the use_columns parameter like in pandas.read_excel.

def load_sheet_by_name(
    self,
    name: str,
    *,
    header_row: int | None = 0,
    column_names: list[str] | None = None,
    skip_rows: int = 0,
    n_rows: int | None = None,
    schema_sample_rows: int | None = 1000,
    use_columns: list[str] | list[int] | str | Callable[[str], bool] | None = None,
        dtypes: 'DTypeMap | None' = None
) -> ExcelSheet: ...