Skip to content

Commit b956d2a

Browse files
committed
type signatures
1 parent 5ac7905 commit b956d2a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

pandas/core/frame.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,12 @@ def to_html(
22262226
# ----------------------------------------------------------------------
22272227
@Appender(info.__doc__)
22282228
def info(
2229-
self, verbose=None, buf=None, max_cols=None, memory_usage=None, null_counts=None
2229+
self,
2230+
verbose: Optional[bool] = None,
2231+
buf: Optional[IO[str]] = None,
2232+
max_cols: Optional[int] = None,
2233+
memory_usage: Optional[Union[bool, str]] = None,
2234+
null_counts: Optional[bool] = None,
22302235
) -> None:
22312236
return info(self, verbose, buf, max_cols, memory_usage, null_counts)
22322237

pandas/io/formats/info.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
import sys
2+
from typing import IO, TYPE_CHECKING, Optional, Union
23

34
from pandas._config import get_option
45

56
from pandas.io.formats import format as fmt
67
from pandas.io.formats.printing import pprint_thing
78

9+
if TYPE_CHECKING:
10+
from pandas.core.generic import NDFrame
11+
812

913
def _put_str(s, space):
1014
return str(s)[:space].ljust(space)
1115

1216

1317
def info(
14-
data, verbose=None, buf=None, max_cols=None, memory_usage=None, null_counts=None
18+
data: NDFrame,
19+
verbose: Optional[bool] = None,
20+
buf: Optional[IO[str]] = None,
21+
max_cols: Optional[int] = None,
22+
memory_usage: Optional[Union[bool, str]] = None,
23+
null_counts: Optional[bool] = None,
1524
) -> None:
1625
"""
1726
Print a concise summary of a DataFrame.

0 commit comments

Comments
 (0)