Skip to content

Commit 440206d

Browse files
committed
add type hints
1 parent 7ffbf1a commit 440206d

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

pandas/core/frame.py

+27-24
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@
5151
ArrayLike,
5252
Axes,
5353
Axis,
54+
ColspaceArgType,
5455
CompressionOptions,
5556
Dtype,
5657
FilePathOrBuffer,
58+
FloatFormatType,
59+
FormattersType,
5760
FrameOrSeriesUnion,
5861
IndexKeyFunc,
5962
Label,
@@ -1612,11 +1615,11 @@ def to_gbq(
16121615
self,
16131616
destination_table: str,
16141617
project_id: Optional[str] = None,
1615-
chunksize=None,
1618+
chunksize: Optional[int] = None,
16161619
reauth: bool = False,
16171620
if_exists: str = "fail",
16181621
auth_local_webserver: bool = False,
1619-
table_schema=None,
1622+
table_schema: Optional[List[Dict[str, str]]] = None,
16201623
location: Optional[str] = None,
16211624
progress_bar: bool = True,
16221625
credentials=None,
@@ -2474,29 +2477,29 @@ def to_parquet(
24742477
@Substitution(shared_params=fmt.common_docstring, returns=fmt.return_docstring)
24752478
def to_html(
24762479
self,
2477-
buf=None,
2478-
columns=None,
2479-
col_space=None,
2480-
header=True,
2481-
index=True,
2482-
na_rep="NaN",
2483-
formatters=None,
2484-
float_format=None,
2485-
sparsify=None,
2486-
index_names=True,
2487-
justify=None,
2488-
max_rows=None,
2489-
max_cols=None,
2490-
show_dimensions=False,
2480+
buf: Optional[FilePathOrBuffer[str]] = None,
2481+
columns: Optional[Sequence[str]] = None,
2482+
col_space: Optional[ColspaceArgType] = None,
2483+
header: Union[bool, Sequence[str]] = True,
2484+
index: bool = True,
2485+
na_rep: str = "NaN",
2486+
formatters: Optional[FormattersType] = None,
2487+
float_format: Optional[FloatFormatType] = None,
2488+
index_names: bool = True,
2489+
sparsify: Optional[bool] = None,
2490+
justify: Optional[str] = None,
2491+
max_rows: Optional[int] = None,
2492+
max_cols: Optional[int] = None,
2493+
show_dimensions: Union[bool, str] = False,
24912494
decimal: str = ".",
2492-
bold_rows=True,
2493-
classes=None,
2494-
escape=True,
2495-
notebook=False,
2496-
border=None,
2497-
table_id=None,
2498-
render_links=False,
2499-
encoding=None,
2495+
bold_rows: bool = True,
2496+
classes: Optional[Union[str, List, Tuple]] = None,
2497+
escape: bool = True,
2498+
notebook: bool = False,
2499+
border: Optional[int] = None,
2500+
table_id: Optional[str] = None,
2501+
render_links: bool = False,
2502+
encoding: Optional[str] = None,
25002503
):
25012504
"""
25022505
Render a DataFrame as an HTML table.

0 commit comments

Comments
 (0)