[text] K

Viewer

  1. import streamlit as st
  2. import pandas as pd
  3.  
  4. def main():
  5.     # Page title
  6.     st.title("TOS Data Harmonization Platform")
  7.  
  8.     # Harmonization data
  9.     harmonization_data = [
  10.         {"Type": "Competitor Harmonization", "Description": "0000"},
  11.         {"Type": "Product Harmonization", "Description": ""},
  12.         {"Type": "Market/Format Harmonization", "Description": "000"},
  13.         {"Type": "Cognitive and Integrated Insights platform powered by AI/ML", "Description": ""},
  14.         {"Type": "Time Period Harmonization", "Description": ""}
  15.     ]
  16.  
  17.     # Convert to DataFrame
  18.     df = pd.DataFrame(harmonization_data)
  19.  
  20.     # Display harmonization types
  21.     st.subheader("Harmonization Types")
  22.     st.table(df)
  23.  
  24.     # Additional information for each type
  25.     st.subheader("Additional Information")
  26.  
  27.     # Select type
  28.     selected_type = st.selectbox("Select a type:", df["Type"])
  29.  
  30.     # Display description
  31.     description = df.loc[df["Type"] == selected_type, "Description"].values[0]
  32.     st.write(f"**Description:** {description}")
  33.  
  34. if __name__ == "__main__":
  35.     main()

Editor

You can edit this paste and save as new:


File Description
  • K
  • Paste Code
  • 24 Apr-2024
  • 1.08 Kb
You can Share it: