src/extractor-lib/edfi_lms_extractor_lib/csv_generation/write.py
def _write_multi_tuple_csv(
    dfs_to_write: Dict[Tuple[str, str], DataFrame],
    output_date: datetime,
    directory_template: str,
):
    """
    Write a series of LMS UDM DataFrames to CSV files

    Parameters
    ----------
    dfs_to_write: Dict[Tuple[str, str], DataFrame]
        is a Dict of 2 id tuples/LMS UDM DataFrame pairs
    output_date: datetime
        is the timestamp for the filename
    directory_template: str
        is the directory the file will go in, with an {id1} and an {id2} placeholder
    """
    assert "{id1}" in directory_template
    assert "{id2}" in directory_template

    for id_tuple, df_to_write in dfs_to_write.items():
        (id1, id2) = id_tuple
        directory: str = directory_template.format(id1=id1, id2=id2)
        _write_csv(df_to_write, output_date, directory)

    Write a series of LMS UDM DataFrames to CSV files

    Parameters
    ----------
    dfs_to_write: Dict[Tuple[str, str], DataFrame]
        is a Dict of 2 id tuples/LMS UDM DataFrame pairs
    output_date: datetime
        is the timestamp for the filename
    directory_template: str
        is the directory the file will go in, with an {id1} and an {id2} placeholder
    
Write a series of LMS UDM DataFrames to CSV files
Parameters

Dict[Tuple[str, str], DataFrame]
is a Dict of 2 id tuples/LMS UDM DataFrame pairs
output_date: datetime
is the timestamp for the filename
directory_template: str
is the directory the file will go in, with an {id1} and an {id2} placeholder
Write a series of LMS UDM DataFrames to CSV files Parameters Dict [ Tuple [ str str ] DataFrame ] is a Dict of 2 id tuples / LMS UDM DataFrame pairs output_date : datetime is the timestamp for the filename directory_template : str is the directory the file will go in with an { id1 } and an { id2 } placeholder
def _write_multi_tuple_csv(
    dfs_to_write: Dict[Tuple[str, str], DataFrame],
    output_date: datetime,
    directory_template: str,
):
    assert "{id1}" in directory_template
    assert "{id2}" in directory_template
    for id_tuple, df_to_write in dfs_to_write.items():
        (id1, id2) = id_tuple
        directory: str = directory_template.format(id1=id1, id2=id2)
        _write_csv(df_to_write, output_date, directory)
def _write_multi_tuple_csv ( dfs_to_write : Dict [ Tuple [ str , str ] , DataFrame ] , output_date : datetime , directory_template : str , ) : assert "{id1}" in directory_template assert "{id2}" in directory_template for id_tuple , df_to_write in dfs_to_write . items ( ) : ( id1 , id2 ) = id_tuple directory : str = directory_template . format ( id1 = id1 , id2 = id2 ) _write_csv ( df_to_write , output_date , directory )
Write a series of LMS UDM DataFrames to CSV files
Parameters
Write a series of LMS UDM DataFrames to CSV files Parameters
"""
    Write a series of LMS UDM DataFrames to CSV files

    Parameters
    ----------
    dfs_to_write: Dict[Tuple[str, str], DataFrame]
        is a Dict of 2 id tuples/LMS UDM DataFrame pairs
    output_date: datetime
        is the timestamp for the filename
    directory_template: str
        is the directory the file will go in, with an {id1} and an {id2} placeholder
    """
dfs_to_write
Dict[Tuple[str, str], DataFrame]
output_date
datetime
directory_template
str