pandas 1.4.2

ParametersReturns
read_sas(filepath_or_buffer: 'FilePath | ReadBuffer[bytes]', format: 'str | None' = None, index: 'Hashable | None' = None, encoding: 'str | None' = None, chunksize: 'int | None' = None, iterator: 'bool' = False) -> 'DataFrame | ReaderBase'

Parameters

filepath_or_buffer : str, path object, or file-like object

String, path object (implementing os.PathLike[str] ), or file-like object implementing a binary read() function. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.sas .

format : str {'xport', 'sas7bdat'} or None

If None, file format is inferred from file extension. If 'xport' or 'sas7bdat', uses the corresponding format.

index : identifier of index column, defaults to None

Identifier of column that should be used as index of the DataFrame.

encoding : str, default is None

Encoding for text data. If None, text data are stored as raw bytes.

chunksize : int

Read file :None:None:`chunksize` lines at a time, returns iterator.

versionchanged

TextFileReader is a context manager.

iterator : bool, defaults to False

If True, returns an iterator for reading the file incrementally.

versionchanged

TextFileReader is a context manager.

Returns

DataFrame if iterator=False and chunksize=None, else SAS7BDATReader
or XportReader

Read SAS files stored as either XPORT or SAS7BDAT format files.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/io/sas/sasreader.py#72
type: <class 'function'>
Commit: