Skip to content

Commit 44d5f7b

Browse files
committed
ENH: Add read_table
Fully add read table and supporting classes
1 parent a9800c8 commit 44d5f7b

File tree

3 files changed

+524
-0
lines changed

3 files changed

+524
-0
lines changed

pandas-stubs/_libs/lib.pyi

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
from __future__ import annotations
22

3+
from enum import Enum
4+
35
no_default = None
46

7+
from typing import Literal
8+
9+
class _NoDefault(Enum):
10+
no_default = ...
11+
12+
NoDefault = Literal[_NoDefault.no_default]
13+
514
def infer_dtype(value: object, skipna: bool = ...) -> str: ...

pandas-stubs/_typing.pyi

+12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ from typing import (
1616
AnyStr,
1717
Callable,
1818
Hashable,
19+
Iterator,
1920
Literal,
2021
Mapping,
2122
Optional,
@@ -70,6 +71,15 @@ class WriteBuffer(BaseBuffer, Protocol[AnyStr_cov]): ...
7071
class ReadPickleBuffer(ReadBuffer[bytes], Protocol):
7172
def readline(self) -> AnyStr_cov: ...
7273

74+
class WriteExcelBuffer(WriteBuffer[bytes], Protocol):
75+
def truncate(self, size: int | None = ...) -> int: ...
76+
77+
class ReadCsvBuffer(ReadBuffer[AnyStr_cov], Protocol[AnyStr_cov]):
78+
def __iter__(self) -> Iterator[AnyStr_cov]: ...
79+
def readline(self) -> AnyStr_cov: ...
80+
@property
81+
def closed(self) -> bool: ...
82+
7383
FilePath = Union[str, PathLike[str]]
7484

7585
Buffer = Union[IO[AnyStr], RawIOBase, BufferedIOBase, TextIOBase, TextIOWrapper, mmap]
@@ -211,4 +221,6 @@ GroupByObjectNonScalar = Union[
211221
]
212222
GroupByObject = Union[Scalar, GroupByObjectNonScalar]
213223

224+
CSVEngine = Literal["c", "python", "pyarrow", "python-fwf"]
225+
214226
__all__ = ["npt", "type_t"]

0 commit comments

Comments
 (0)