|
1 |
| -"""Utilities for conversion to writer-agnostic Excel representation |
| 1 | +""" |
| 2 | +Utilities for conversion to writer-agnostic Excel representation. |
2 | 3 | """
|
3 | 4 |
|
4 | 5 | from functools import reduce
|
5 | 6 | import itertools
|
6 | 7 | import re
|
7 |
| -from typing import Callable, Dict, List, Optional, Sequence, Union |
| 8 | +from typing import Callable, Dict, Optional, Sequence, Union |
8 | 9 | import warnings
|
9 | 10 |
|
10 | 11 | import numpy as np
|
11 | 12 |
|
| 13 | +from pandas._typing import Label |
| 14 | + |
12 | 15 | from pandas.core.dtypes import missing
|
13 | 16 | from pandas.core.dtypes.common import is_float, is_scalar
|
14 | 17 | from pandas.core.dtypes.generic import ABCMultiIndex, ABCPeriodIndex
|
@@ -371,10 +374,10 @@ def __init__(
|
371 | 374 | df,
|
372 | 375 | na_rep: str = "",
|
373 | 376 | float_format: Optional[str] = None,
|
374 |
| - cols: Optional[Sequence] = None, |
375 |
| - header: Union[bool, List[str]] = True, |
| 377 | + cols: Optional[Sequence[Label]] = None, |
| 378 | + header: Union[Sequence[Label], bool] = True, |
376 | 379 | index: bool = True,
|
377 |
| - index_label: Union[str, Sequence, None] = None, |
| 380 | + index_label: Optional[Union[Label, Sequence[Label]]] = None, |
378 | 381 | merge_cells: bool = False,
|
379 | 382 | inf_rep: str = "inf",
|
380 | 383 | style_converter: Optional[Callable] = None,
|
|
0 commit comments