pandas/core/construction.py
def create_series_with_explicit_dtype(
    data: Any = None,
    index: Optional[Union[ArrayLike, Index]] = None,
    dtype: Optional[Dtype] = None,
    name: Optional[str] = None,
    copy: bool = False,
    fastpath: bool = False,
    dtype_if_empty: Dtype = object,
) -> Series:
    """
    Helper to pass an explicit dtype when instantiating an empty Series.

    This silences a DeprecationWarning described in GitHub-17261.

    Parameters
    ----------
    data : Mirrored from Series.__init__
    index : Mirrored from Series.__init__
    dtype : Mirrored from Series.__init__
    name : Mirrored from Series.__init__
    copy : Mirrored from Series.__init__
    fastpath : Mirrored from Series.__init__
    dtype_if_empty : str, numpy.dtype, or ExtensionDtype
        This dtype will be passed explicitly if an empty Series will
        be instantiated.

    Returns
    -------
    Series
    """
    from pandas.core.series import Series

    if is_empty_data(data) and dtype is None:
        dtype = dtype_if_empty
    return Series(
        data=data, index=index, dtype=dtype, name=name, copy=copy, fastpath=fastpath
    )

    Helper to pass an explicit dtype when instantiating an empty Series.

    This silences a DeprecationWarning described in GitHub-17261.

    Parameters
    ----------
    data : Mirrored from Series.__init__
    index : Mirrored from Series.__init__
    dtype : Mirrored from Series.__init__
    name : Mirrored from Series.__init__
    copy : Mirrored from Series.__init__
    fastpath : Mirrored from Series.__init__
    dtype_if_empty : str, numpy.dtype, or ExtensionDtype
        This dtype will be passed explicitly if an empty Series will
        be instantiated.

    Returns
    -------
    Series
    
Helper to pass an explicit dtype when instantiating an empty Series.
This silences a DeprecationWarning described in GitHub-17261.

Parameters



Returns

Series
Helper to pass an explicit dtype when instantiating an empty Series . This silences a DeprecationWarning described in GitHub - 17261 . Parameters Returns Series
def create_series_with_explicit_dtype(
    data: Any = None,
    index: Optional[Union[ArrayLike, Index]] = None,
    dtype: Optional[Dtype] = None,
    name: Optional[str] = None,
    copy: bool = False,
    fastpath: bool = False,
    dtype_if_empty: Dtype = object,
) -> Series:
    from pandas.core.series import Series
    if is_empty_data(data) and dtype is None:
        dtype = dtype_if_empty
    return Series(
        data=data, index=index, dtype=dtype, name=name, copy=copy, fastpath=fastpath
    )
def create_series_with_explicit_dtype ( data : Any = None , index : Optional [ Union [ ArrayLike , Index ] ] = None , dtype : Optional [ Dtype ] = None , name : Optional [ str ] = None , copy : bool = False , fastpath : bool = False , dtype_if_empty : Dtype = object , ) -> Series : from pandas . core . series import Series if is_empty_data ( data ) and dtype is None : dtype = dtype_if_empty return Series ( data = data , index = index , dtype = dtype , name = name , copy = copy , fastpath = fastpath )
Helper to pass an explicit dtype when instantiating an empty Series.
Helper to pass an explicit dtype when instantiating an empty Series .
"""
    Helper to pass an explicit dtype when instantiating an empty Series.

    This silences a DeprecationWarning described in GitHub-17261.

    Parameters
    ----------
    data : Mirrored from Series.__init__
    index : Mirrored from Series.__init__
    dtype : Mirrored from Series.__init__
    name : Mirrored from Series.__init__
    copy : Mirrored from Series.__init__
    fastpath : Mirrored from Series.__init__
    dtype_if_empty : str, numpy.dtype, or ExtensionDtype
        This dtype will be passed explicitly if an empty Series will
        be instantiated.

    Returns
    -------
    Series
    """
data
Any
index
Optional[Union[ArrayLike, Index]]
dtype
Optional[Dtype]
name
Optional[str]
copy
bool
fastpath
bool
dtype_if_empty
Dtype