call_report.fca.institutions.read_institutions#
- call_report.fca.institutions.read_institutions(*, release_dir: Path, dataframe_type: None = None) NativeDataFrame[source]#
- call_report.fca.institutions.read_institutions(*, release_dir: Path, dataframe_type: Literal['pandas']) pandas.DataFrame
- call_report.fca.institutions.read_institutions(*, release_dir: Path, dataframe_type: Literal['pyarrow_table']) pyarrow.Table
- call_report.fca.institutions.read_institutions(*, release_dir: Path, dataframe_type: Literal['polars_dataframe']) polars.DataFrame
- call_report.fca.institutions.read_institutions(*, release_dir: Path, dataframe_type: Literal['polars_lazyframe']) polars.LazyFrame
Parse a release’s institution roster into a native dataframe.
Locates and parses the
D_INST[_<YEAR>].TXT/INST...TXTfile pair within release_dir, the same way any other schedule is parsed.- Parameters:
- release_dirpathlib.Path
Path to one quarter’s extracted release files.
- dataframe_type{“pandas”, “pyarrow_table”, “polars_lazyframe”, “polars_dataframe”}, optional
The dataframe type to convert the result to as a final step. Leave this
None(the default) to get back whatever backend call_report.config.get_config currently has configured. Set it when the code that consumes this result needs a specific type, for example a pandas DataFrame while the package is configured to use polars.
- Returns:
- NativeDataFrame
A native dataframe of the configured backend (or of dataframe_type, if supplied), one row per institution.
- Raises:
- DownloadError
If release_dir has no matched
INSTlayout/data file pair.