|
import streamlit as st |
|
import pandas as pd |
|
|
|
|
|
positive_texts = ["Text A", "Text B", "Text C"] |
|
positive_values = [0.8365079365079348, 0.12222222222222279, 0.04603174603174587] |
|
|
|
negative_texts = ["Text X", "Text Y", "Text Z"] |
|
negative_values = [-0.12063492063492065, -0.16349206349206302, -0.053968253968253166] |
|
|
|
|
|
st.title('Important Variables Analysis') |
|
|
|
|
|
def create_table(texts, values, title): |
|
df = pd.DataFrame({"Feature Explanation": texts, 'Value': values}) |
|
st.markdown(f'### {title}') |
|
st.table(df) |
|
|
|
|
|
col1, col2 = st.columns(2) |
|
|
|
|
|
with col1: |
|
create_table(positive_texts, positive_values, 'Important Suspicious Variables') |
|
|
|
with col2: |
|
create_table(negative_texts, negative_values, 'Important Unsuspicious Variables') |