downloader.entsoe.merge_build_manual

downloader.entsoe.merge_build_manual(output_file='energy_load.csv')

Merge all raw CSV files from the ‘raw’ directory into a single interim file.

This function looks for all .csv files in get_data_home() / "raw", sorts them by time index, and saves the unique combined data to get_data_home() / "interim" / output_file.

Parameters

Name Type Description Default
output_file str The name of the combined output file. Defaults to “energy_load.csv”. 'energy_load.csv'

Raises

Name Type Description
FileNotFoundError If the raw directory does not exist.
ValueError If no valid CSV files are found for merging.

Notes

Logging information can be selected by setting the log level for the spotforecast2_safe.downloader.entsoe logger. Common levels are DEBUG, INFO, WARNING, ERROR, and CRITICAL. The cell below shows the default (WARNING); change the level to INFO or DEBUG for more verbose output.

import logging
logging.getLogger("spotforecast2_safe.downloader.entsoe").setLevel(logging.WARNING)

Examples

from spotforecast2_safe.downloader.entsoe import merge_build_manual

# Merge with the default output filename
merge_build_manual()

# Or merge with a custom output filename
merge_build_manual(output_file="custom_energy_load.csv")