from pandas import Categorical as Categorical, DataFrame as DataFrame, Index as Index, MultiIndex as MultiIndex, Series as Series
from pandas._typing import FrameOrSeries as FrameOrSeries
from pandas.core import groupby as groupby
from pandas.core.dtypes.common import ensure_float64 as ensure_float64, ensure_int64 as ensure_int64, ensure_object as ensure_object, is_array_like as is_array_like, is_bool as is_bool, is_bool_dtype as is_bool_dtype, is_categorical_dtype as is_categorical_dtype, is_datetime64tz_dtype as is_datetime64tz_dtype, is_dtype_equal as is_dtype_equal, is_extension_array_dtype as is_extension_array_dtype, is_float_dtype as is_float_dtype, is_integer as is_integer, is_integer_dtype as is_integer_dtype, is_list_like as is_list_like, is_number as is_number, is_numeric_dtype as is_numeric_dtype, is_object_dtype as is_object_dtype, needs_i8_conversion as needs_i8_conversion
from pandas.core.dtypes.generic import ABCDataFrame as ABCDataFrame, ABCSeries as ABCSeries
from pandas.core.dtypes.missing import isna as isna, na_value_for_dtype as na_value_for_dtype
from pandas.core.internals import concatenate_block_managers as concatenate_block_managers
from pandas.core.sorting import is_int64_overflow_possible as is_int64_overflow_possible
from pandas.errors import MergeError as MergeError
from pandas.util._decorators import Appender as Appender, Substitution as Substitution
from typing import Any, Union

def merge(left: Any, right: Any, how: str=..., on: Any = ..., left_on: Any = ..., right_on: Any = ..., left_index: bool=..., right_index: bool=..., sort: bool=..., suffixes: Any = ..., copy: bool=..., indicator: bool=..., validate: Any = ...) -> DataFrame: ...
def merge_ordered(left: Any, right: Any, on: Any = ..., left_on: Any = ..., right_on: Any = ..., left_by: Any = ..., right_by: Any = ..., fill_method: Any = ..., suffixes: Any = ..., how: str=...) -> DataFrame: ...
def merge_asof(left: Any, right: Any, on: Any = ..., left_on: Any = ..., right_on: Any = ..., left_index: bool=..., right_index: bool=..., by: Any = ..., left_by: Any = ..., right_by: Any = ..., suffixes: Any = ..., tolerance: Any = ..., allow_exact_matches: bool=..., direction: str=...) -> DataFrame: ...

class _MergeOperation:
    left: Any = ...
    right: Any = ...
    how: Any = ...
    axis: Any = ...
    on: Any = ...
    left_on: Any = ...
    right_on: Any = ...
    copy: Any = ...
    suffixes: Any = ...
    sort: Any = ...
    left_index: Any = ...
    right_index: Any = ...
    indicator: Any = ...
    indicator_name: Any
    def __init__(self, left: Union[Series, DataFrame], right: Union[Series, DataFrame], how: str=..., on: Any = ..., left_on: Any = ..., right_on: Any = ..., axis: Any = ..., left_index: bool=..., right_index: bool=..., sort: bool=..., suffixes: Any = ..., copy: bool=..., indicator: bool=..., validate: Any = ...) -> None: ...
    def get_result(self) -> Any: ...

class _OrderedMerge(_MergeOperation):
    fill_method: Any = ...
    def __init__(self, left: Any, right: Any, on: Any = ..., left_on: Any = ..., right_on: Any = ..., left_index: bool=..., right_index: bool=..., axis: Any = ..., suffixes: Any = ..., copy: bool=..., fill_method: Any = ..., how: str=...) -> None: ...
    def get_result(self) -> Any: ...

class _AsOfMerge(_OrderedMerge):
    by: Any = ...
    left_by: Any = ...
    right_by: Any = ...
    tolerance: Any = ...
    allow_exact_matches: Any = ...
    direction: Any = ...
    def __init__(self, left: Any, right: Any, on: Any = ..., left_on: Any = ..., right_on: Any = ..., left_index: bool=..., right_index: bool=..., by: Any = ..., left_by: Any = ..., right_by: Any = ..., axis: Any = ..., suffixes: Any = ..., copy: bool=..., fill_method: Any = ..., how: str=..., tolerance: Any = ..., allow_exact_matches: bool=..., direction: str=...) -> None: ...
