bulum.io.lqn_io module

IO functions for IQQM listquan output files.

This module provides functionality to read IQQM listquan output files, which are space-separated text files containing time series data.

read_iqqm_lqn_output(filename: str | PathLike, col_name: str | None = None, df: DataFrame | None = None, *, data_start_row: int = 7, dropna: bool = False) TimeseriesDataframe

Reads the output of IQQM listquan. This is a space-separated format with two columns (date, value) and data starting on line 7.

Parameters:
  • filename (str or os.PathLike) – Path to the file to be read.

  • col_name (str, optional) – If supplied, sets the name for the resulting output column, otherwise uses the filename. Default is None.

  • df (pandas.DataFrame, optional) – If supplied, joins the output to df. (Does not modify df.) Default is None.

  • data_start_row (int, optional) – Optionally specify the start row; may be useful for reading other IQQM TEXT outputs. Default is 7.

  • dropna (bool, optional) – Remove NA values from dataframe before reading. Default is False.

Returns:

A time series dataframe containing the parsed data with standardized date index and the specified column name.

Return type:

TimeseriesDataframe