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

import pandas as pd
from collections import abc
from pandas._typing import CompressionOptions, FilePath, ReadBuffer
from pandas.util._decorators import Appender
from pandas.io.sas.sasreader import ReaderBase

"""
Read a SAS XPort format file into a Pandas DataFrame.

Based on code from Jack Cushman (github.com/jcushman/xport).

The file format is defined here:

https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf
"""
_correct_line1 = ...
_correct_header1 = ...
_correct_header2 = ...
_correct_obs_header = ...
_fieldkeys = ...
_base_params_doc = ...
_params2_doc = ...
_format_params_doc = ...
_iterator_doc = ...
_read_sas_doc = ...
_xport_reader_doc = ...
_read_method_doc = ...
class XportReader(ReaderBase, abc.Iterator):
    __doc__ = ...
    def __init__(self, filepath_or_buffer: FilePath | ReadBuffer[bytes], index=..., encoding: str | None = ..., chunksize=..., compression: CompressionOptions = ...) -> None:
        ...
    
    def close(self) -> None:
        ...
    
    def __next__(self) -> pd.DataFrame:
        ...
    
    def get_chunk(self, size=...) -> pd.DataFrame:
        """
        Reads lines from Xport file and returns as dataframe

        Parameters
        ----------
        size : int, defaults to None
            Number of lines to read.  If None, reads whole file.

        Returns
        -------
        DataFrame
        """
        ...
    
    @Appender(_read_method_doc)
    def read(self, nrows: int | None = ...) -> pd.DataFrame:
        ...
    


