You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
miner/frontend/pages/normalization.py

24 lines
712 B

import streamlit as st
from mvstrategy import MVStrategy
if "data" in st.session_state:
data = st.session_state.data
st.session_state.data = data.copy()
for column, series in data.items():
missing_count = series.isna().sum()
choices = MVStrategy.list_available(series)
option = st.selectbox(
f"Missing values of {column} ({missing_count})",
choices,
index=1,
key=f"mv-{column}",
)
# Always re-get the series to avoid reusing an invalidated series pointer
data = option.apply(data, column, data[column])
st.write(data)
st.session_state.working_data = data
else:
st.error("file not loaded")