Merge branch 'main' of https://git.andrestork.moe/PCTOENER/CACER-simulator
This commit is contained in:
@@ -66,6 +66,24 @@ fig = px.line(
|
||||
)
|
||||
fig.show()
|
||||
|
||||
def export_hourly_pv_productivity(result_ac_energies_to_csv_df, path_export_hourly):
|
||||
"""
|
||||
Esporta la produttività fotovoltaica aggregata su base oraria.
|
||||
"""
|
||||
# Raggruppa per ora e somma la produzione dei 4 quarti d'ora
|
||||
df_hourly = result_ac_energies_to_csv_df.resample('H').sum()
|
||||
df_hourly.to_csv(path_export_hourly, encoding='utf-8')
|
||||
print(f"File CSV orario salvato in: {path_export_hourly}")
|
||||
|
||||
# --- USO DELLA FUNZIONE DOPO L'EXPORT ORIGINALE ---
|
||||
|
||||
# Scegli il percorso per il nuovo file orario
|
||||
path_export_hourly = path_export.replace('.csv', '_hourly.csv')
|
||||
|
||||
# Esporta il file orario
|
||||
export_hourly_pv_productivity(result_ac_energies_to_csv_df, path_export_hourly)
|
||||
|
||||
|
||||
if joePlaying:
|
||||
joe.terminate()
|
||||
joe.kill()
|
||||
Reference in New Issue
Block a user