Skip to content
3 changes: 3 additions & 0 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ from typing_extensions import (
import xarray as xr

from pandas._libs.interval import Interval
from pandas._libs.lib import NoDefault
from pandas._libs.missing import NAType
from pandas._libs.tslibs import BaseOffset
from pandas._typing import (
Expand All @@ -96,6 +97,7 @@ from pandas._typing import (
CategoryDtypeArg,
ComplexDtypeArg,
CompressionOptions,
DtypeBackend,
DtypeObj,
FilePath,
FillnaOptions,
Expand Down Expand Up @@ -1133,6 +1135,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
convert_string: _bool = ...,
convert_integer: _bool = ...,
convert_boolean: _bool = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> Series[S1]: ...
@overload
def ffill(
Expand Down
6 changes: 6 additions & 0 deletions pandas-stubs/core/tools/numeric.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import numpy as np
import pandas as pd
from typing_extensions import TypeAlias

from pandas._libs.lib import NoDefault
from pandas._typing import (
DtypeBackend,
IgnoreRaiseCoerce,
Scalar,
npt,
Expand All @@ -20,22 +22,26 @@ def to_numeric(
arg: Scalar,
errors: Literal["raise", "coerce"] = ...,
downcast: _Downcast = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> float: ...
@overload
def to_numeric(
arg: Scalar,
errors: Literal["ignore"],
downcast: _Downcast = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> Scalar: ...
@overload
def to_numeric(
arg: list | tuple | np.ndarray,
errors: IgnoreRaiseCoerce = ...,
downcast: _Downcast = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> npt.NDArray: ...
@overload
def to_numeric(
arg: pd.Series,
errors: IgnoreRaiseCoerce = ...,
downcast: _Downcast = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> pd.Series: ...
5 changes: 5 additions & 0 deletions pandas-stubs/io/clipboards.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ from typing import (

from pandas.core.frame import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
CompressionOptions,
CSVEngine,
CSVQuoting,
DtypeArg,
DtypeBackend,
ListLikeHashable,
StorageOptions,
UsecolsArgType,
Expand Down Expand Up @@ -80,6 +82,7 @@ def read_clipboard(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> TextFileReader: ...
@overload
def read_clipboard(
Expand Down Expand Up @@ -137,6 +140,7 @@ def read_clipboard(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> TextFileReader: ...
@overload
def read_clipboard(
Expand Down Expand Up @@ -194,6 +198,7 @@ def read_clipboard(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
def to_clipboard(
obj, excel: bool = ..., sep: str | None = ..., **kwargs: Any
Expand Down
4 changes: 4 additions & 0 deletions pandas-stubs/io/excel/_base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ import pyxlsb.workbook
from typing_extensions import Self
from xlrd.book import Book

from pandas._libs.lib import NoDefault
from pandas._typing import (
Dtype,
DtypeBackend,
FilePath,
ListLikeHashable,
ReadBuffer,
Expand Down Expand Up @@ -66,6 +68,7 @@ def read_excel(
comment: str | None = ...,
skipfooter: int = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> dict[int | str, DataFrame]: ...
@overload
def read_excel(
Expand Down Expand Up @@ -104,6 +107,7 @@ def read_excel(
comment: str | None = ...,
skipfooter: int = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...

class ExcelWriter:
Expand Down
3 changes: 3 additions & 0 deletions pandas-stubs/io/feather_format.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pandas import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
DtypeBackend,
FilePath,
HashableT,
ReadBuffer,
Expand All @@ -12,4 +14,5 @@ def read_feather(
columns: list[HashableT] | None = ...,
use_threads: bool = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
3 changes: 3 additions & 0 deletions pandas-stubs/io/html.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ from typing import (

from pandas.core.frame import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
DtypeBackend,
FilePath,
HashableT1,
HashableT2,
Expand Down Expand Up @@ -49,4 +51,5 @@ def read_html(
keep_default_na: bool = ...,
displayed_only: bool = ...,
extract_links: Literal["header", "footer", "body", "all"] | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> list[DataFrame]: ...
6 changes: 6 additions & 0 deletions pandas-stubs/io/json/_json.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ from typing import (
from pandas.core.frame import DataFrame
from pandas.core.series import Series

from pandas._libs.lib import NoDefault
from pandas._typing import (
CompressionOptions,
DtypeArg,
DtypeBackend,
FilePath,
HashableT,
JsonFrameOrient,
Expand Down Expand Up @@ -43,6 +45,7 @@ def read_json(
compression: CompressionOptions = ...,
nrows: int | None = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> JsonReader[Series]: ...
@overload
def read_json(
Expand All @@ -66,6 +69,7 @@ def read_json(
compression: CompressionOptions = ...,
nrows: int | None = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> JsonReader[DataFrame]: ...
@overload
def read_json(
Expand All @@ -89,6 +93,7 @@ def read_json(
compression: CompressionOptions = ...,
nrows: int | None = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> Series: ...
@overload
def read_json(
Expand All @@ -112,6 +117,7 @@ def read_json(
compression: CompressionOptions = ...,
nrows: int | None = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...

class JsonReader(abc.Iterator, Generic[NDFrameT]):
Expand Down
3 changes: 3 additions & 0 deletions pandas-stubs/io/orc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ from typing import Any

from pandas import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
DtypeBackend,
FilePath,
HashableT,
ReadBuffer,
Expand All @@ -11,5 +13,6 @@ from pandas._typing import (
def read_orc(
path: FilePath | ReadBuffer[bytes],
columns: list[HashableT] | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
**kwargs: Any,
) -> DataFrame: ...
8 changes: 8 additions & 0 deletions pandas-stubs/io/parsers/readers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ from typing import (
from pandas.core.frame import DataFrame
from typing_extensions import Self

from pandas._libs.lib import NoDefault
from pandas._typing import (
CompressionOptions,
CSVEngine,
CSVQuoting,
DtypeArg,
DtypeBackend,
FilePath,
ListLikeHashable,
ReadCsvBuffer,
Expand Down Expand Up @@ -90,6 +92,7 @@ def read_csv(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> TextFileReader: ...
@overload
def read_csv(
Expand Down Expand Up @@ -149,6 +152,7 @@ def read_csv(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> TextFileReader: ...
@overload
def read_csv(
Expand Down Expand Up @@ -208,6 +212,7 @@ def read_csv(
memory_map: bool = ...,
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
storage_options: StorageOptions | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
@overload
def read_table(
Expand Down Expand Up @@ -395,6 +400,7 @@ def read_fwf(
infer_nrows: int = ...,
iterator: Literal[True],
chunksize: int | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
**kwds: Any,
) -> TextFileReader: ...
@overload
Expand All @@ -406,6 +412,7 @@ def read_fwf(
infer_nrows: int = ...,
iterator: bool = ...,
chunksize: int,
dtype_backend: DtypeBackend | NoDefault = ...,
**kwds: Any,
) -> TextFileReader: ...
@overload
Expand All @@ -417,6 +424,7 @@ def read_fwf(
infer_nrows: int = ...,
iterator: Literal[False] = ...,
chunksize: None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
**kwds: Any,
) -> DataFrame: ...

Expand Down
3 changes: 3 additions & 0 deletions pandas-stubs/io/spss.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pandas.core.frame import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
DtypeBackend,
FilePath,
HashableT,
)
Expand All @@ -9,4 +11,5 @@ def read_spss(
path: FilePath,
usecols: list[HashableT] | None = ...,
convert_categoricals: bool = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
4 changes: 4 additions & 0 deletions pandas-stubs/io/sql.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def read_sql_table(
columns: list[str] | None = ...,
*,
chunksize: int,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> Generator[DataFrame, None, None]: ...
@overload
def read_sql_table(
Expand All @@ -51,6 +52,7 @@ def read_sql_table(
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
columns: list[str] | None = ...,
chunksize: None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
@overload
def read_sql_query(
Expand All @@ -63,6 +65,7 @@ def read_sql_query(
*,
chunksize: int,
dtype: DtypeArg | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> Generator[DataFrame, None, None]: ...
@overload
def read_sql_query(
Expand All @@ -74,6 +77,7 @@ def read_sql_query(
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
chunksize: None = ...,
dtype: DtypeArg | None = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
@overload
def read_sql(
Expand Down
3 changes: 3 additions & 0 deletions pandas-stubs/io/xml.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ from collections.abc import Sequence

from pandas.core.frame import DataFrame

from pandas._libs.lib import NoDefault
from pandas._typing import (
CompressionOptions,
ConvertersArg,
DtypeArg,
DtypeBackend,
FilePath,
ParseDatesArg,
ReadBuffer,
Expand All @@ -31,4 +33,5 @@ def read_xml(
iterparse: dict[str, list[str]] | None = ...,
compression: CompressionOptions = ...,
storage_options: StorageOptions = ...,
dtype_backend: DtypeBackend | NoDefault = ...,
) -> DataFrame: ...
Loading