pvlib.iotools.read_pvgis_tmy#
- pvlib.iotools.read_pvgis_tmy(filename, pvgis_format=None, map_variables=None)[source]#
Read a file downloaded from PVGIS.
- Parameters
filename (
str,pathlib.Path, orfile-like buffer) – Name, path, or buffer of file downloaded from PVGIS.pvgis_format (
str, defaultNone) – Format of PVGIS file or buffer. Equivalent to theoutputformatparameter in the PVGIS TMY API. Iffilenameis a file andpvgis_formatisNonethen the file extension will be used to determine the PVGIS format to parse. For PVGIS files from the API withoutputformat='basic', please setpvgis_formatto'basic'. Iffilenameis a buffer, thenpvgis_formatis required and must be in['csv', 'epw', 'json', 'basic'].map_variables (
bool) – When true, renames columns of the Dataframe to pvlib variable names where applicable. See variableVARIABLE_MAP.
- Returns
data (
pandas.DataFrame) – the weather datamonths_selected (
list) – TMY year for each month,Nonefor basic and EPWinputs (
dict) – the inputs,Nonefor basic and EPW
- Raises
ValueError – if
pvgis_formatisNoneand the file extension is neither.csv,.json, nor.epw, or ifpvgis_formatis provided as input but isn’t in['csv', 'epw', 'json', 'basic']TypeError – if
pvgis_formatisNoneandfilenameis a buffer
See also