This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
nowcasting_dataset/data_sources/pv Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ def get_pv_power_from_database(
124124 if len (pv_yields_df ) == 0 :
125125 return pd .DataFrame (columns = ["pv_system_id" ])
126126
127- # get the system id from 'pv_system_id=xxxx provider=.....'
127+ # get the system id from 'pv_system_id=xxxx provider=.....'
128128 pv_yields_df ["pv_system_id" ] = (
129129 pv_yields_df ["pv_system" ].astype (str ).str .split (" " ).str [0 ].str .split ("=" ).str [- 1 ]
130130 )
@@ -160,8 +160,8 @@ def get_pv_power_from_database(
160160 )
161161
162162 # we are going interpolate using 'quadratic' method and we need at least 3 data points,
163- # therefore we drop system wiht less than 3 nans
164- pv_yields_df = pv_yields_df .loc [:, pv_yields_df .notnull ().sum () >= 3 ]
163+ # Lets make sure we have double that, therefore we drop system with less than 6 nans
164+ pv_yields_df = pv_yields_df .loc [:, pv_yields_df .notnull ().sum () >= 6 ]
165165
166166 # interpolate in between, maximum 'live_interpolate_minutes' mins
167167 # note data is in 5 minutes chunks
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def test_get_pv_power_from_database(pv_yields_and_systems):
3232 )
3333
3434 assert len (pv_power ) == 19 # 1.5 hours at 5 mins = 6*12
35- assert len (pv_power .columns ) == 3
35+ assert len (pv_power .columns ) == 2
3636 assert pv_power .columns [0 ] == "10"
3737 assert (
3838 pd .to_datetime (pv_power .index [0 ]).isoformat ()
You can’t perform that action at this time.
0 commit comments