Skip to content

TYP: read_csv and read_excel fixes #55410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
IntStrT,
ReadBuffer,
Self,
SequenceNotStr,
StorageOptions,
WriteExcelBuffer,
)
Expand Down Expand Up @@ -387,7 +388,7 @@ def read_excel(
sheet_name: str | int = ...,
*,
header: int | Sequence[int] | None = ...,
names: list[str] | None = ...,
names: SequenceNotStr[Hashable] | range | None = ...,
index_col: int | Sequence[int] | None = ...,
usecols: int
| str
Expand Down Expand Up @@ -426,7 +427,7 @@ def read_excel(
sheet_name: list[IntStrT] | None,
*,
header: int | Sequence[int] | None = ...,
names: list[str] | None = ...,
names: SequenceNotStr[Hashable] | range | None = ...,
index_col: int | Sequence[int] | None = ...,
usecols: int
| str
Expand Down Expand Up @@ -465,7 +466,7 @@ def read_excel(
sheet_name: str | int | list[IntStrT] | None = 0,
*,
header: int | Sequence[int] | None = 0,
names: list[str] | None = None,
names: SequenceNotStr[Hashable] | range | None = None,
index_col: int | Sequence[int] | None = None,
usecols: int
| str
Expand Down Expand Up @@ -730,7 +731,7 @@ def parse(
self,
sheet_name: str | int | list[int] | list[str] | None = 0,
header: int | Sequence[int] | None = 0,
names=None,
names: SequenceNotStr[Hashable] | range | None = None,
index_col: int | Sequence[int] | None = None,
usecols=None,
dtype: DtypeArg | None = None,
Expand Down Expand Up @@ -1589,7 +1590,7 @@ def parse(
self,
sheet_name: str | int | list[int] | list[str] | None = 0,
header: int | Sequence[int] | None = 0,
names=None,
names: SequenceNotStr[Hashable] | range | None = None,
index_col: int | Sequence[int] | None = None,
usecols=None,
converters=None,
Expand Down
20 changes: 10 additions & 10 deletions pandas/io/parsers/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def read_csv(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: Literal[True],
Expand Down Expand Up @@ -726,7 +726,7 @@ def read_csv(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: bool = ...,
Expand Down Expand Up @@ -786,7 +786,7 @@ def read_csv(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: Literal[False] = ...,
Expand Down Expand Up @@ -846,7 +846,7 @@ def read_csv(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: bool = ...,
Expand Down Expand Up @@ -920,7 +920,7 @@ def read_csv(
infer_datetime_format: bool | lib.NoDefault = lib.no_default,
keep_date_col: bool = False,
date_parser: Callable | lib.NoDefault = lib.no_default,
date_format: str | None = None,
date_format: str | dict[Hashable, str] | None = None,
dayfirst: bool = False,
cache_dates: bool = True,
# Iteration
Expand Down Expand Up @@ -1009,7 +1009,7 @@ def read_table(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: Literal[True],
Expand Down Expand Up @@ -1066,7 +1066,7 @@ def read_table(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: bool = ...,
Expand Down Expand Up @@ -1123,7 +1123,7 @@ def read_table(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: Literal[False] = ...,
Expand Down Expand Up @@ -1180,7 +1180,7 @@ def read_table(
infer_datetime_format: bool | lib.NoDefault = ...,
keep_date_col: bool = ...,
date_parser: Callable | lib.NoDefault = ...,
date_format: str | None = ...,
date_format: str | dict[Hashable, str] | None = ...,
dayfirst: bool = ...,
cache_dates: bool = ...,
iterator: bool = ...,
Expand Down Expand Up @@ -1253,7 +1253,7 @@ def read_table(
infer_datetime_format: bool | lib.NoDefault = lib.no_default,
keep_date_col: bool = False,
date_parser: Callable | lib.NoDefault = lib.no_default,
date_format: str | None = None,
date_format: str | dict[Hashable, str] | None = None,
dayfirst: bool = False,
cache_dates: bool = True,
# Iteration
Expand Down