acruzgarcia / OMIEData

Python package to import data from OMIE (Iberian Peninsula's Electricity Market Operator): https://www.omie.es/
https://pypi.org/project/OMIEData/
MIT License
24 stars 7 forks source link

Incorrect parse of files with 23 or 25 days #4

Closed BigTava closed 2 months ago

BigTava commented 1 year ago

Hi, For a date with 23 days, it seems to duplicate the final hour. Example: File: https://www.omie.es/sites/default/files/dados/AGNO_2023/MES_03/TXT/INT_PBC_EV_H_1_26_03_2023_26_03_2023.TXT Result: DATE CONCEPT H1 H2 H3 ... H20 H21 H22 H23 H24 1 2023-03-26 PRICE_PT 45.1 35.0 29.59 ... 74.83 104.63 99.42 82.25 82.25

For a date with 25 days, it ignore the 25th hour. File: https://www.omie.es/sites/default/files/dados/AGNO_2022/MES_10/TXT/INT_PBC_EV_H_1_30_10_2022_30_10_2022.TXT Result: DATE CONCEPT H1 H2 ... H21 H22 H23 H24 1 2022-10-30 PRICE_PT 139.17 105.1 ... 200.0 225.35 209.27 157.31

Any way to fix this?

I have fixed the issue, and included in a pull request:

5