"""
This type stub file was generated by pyright.
"""

import pandas as pd
from typing import TYPE_CHECKING
from pandas.core.interchange.column import PandasColumn
from pandas.core.interchange.dataframe_protocol import DataFrame as DataFrameXchg
from pandas import Index

if TYPE_CHECKING:
    ...
class PandasDataFrameXchg(DataFrameXchg):
    """
    A data frame class, with only the methods required by the interchange
    protocol defined.
    Instances of this (private) class are returned from
    ``pd.DataFrame.__dataframe__`` as objects with the methods and
    attributes defined on this class.
    """
    def __init__(self, df: pd.DataFrame, nan_as_null: bool = ..., allow_copy: bool = ...) -> None:
        """
        Constructor - an instance of this (private) class is returned from
        `pd.DataFrame.__dataframe__`.
        """
        ...
    
    def __dataframe__(self, nan_as_null: bool = ..., allow_copy: bool = ...) -> PandasDataFrameXchg:
        ...
    
    @property
    def metadata(self) -> dict[str, Index]:
        ...
    
    def num_columns(self) -> int:
        ...
    
    def num_rows(self) -> int:
        ...
    
    def num_chunks(self) -> int:
        ...
    
    def column_names(self) -> Index:
        ...
    
    def get_column(self, i: int) -> PandasColumn:
        ...
    
    def get_column_by_name(self, name: str) -> PandasColumn:
        ...
    
    def get_columns(self) -> list[PandasColumn]:
        ...
    
    def select_columns(self, indices) -> PandasDataFrameXchg:
        ...
    
    def select_columns_by_name(self, names) -> PandasDataFrameXchg:
        ...
    
    def get_chunks(self, n_chunks=...): # -> Generator[PandasDataFrameXchg | Self@PandasDataFrameXchg, None, None]:
        """
        Return an iterator yielding the chunks.
        """
        ...
    


