Änderung: parquet_store.py

This commit is contained in:
knedlik
2026-03-01 13:11:28 +01:00
parent 20cd0b8547
commit 67170b8130
7 changed files with 83 additions and 10 deletions

16
app/tools/excel_export.py Normal file
View File

@@ -0,0 +1,16 @@
import pandas as pd
import io
def df_to_excel_bytes(df):
"""
Convert a DataFrame to an in-memory XLSX file.
Returns a BytesIO object suitable for st.download_button(data=...).
"""
buffer = io.BytesIO()
with pd.ExcelWriter(buffer, engine="openpyxl") as writer:
df.to_excel(writer, index=False, sheet_name="Daten")
buffer.seek(0)
return buffer