Spaces:
Running
Running
import pandas as pd | |
import streamlit as st | |
import base64 | |
def clear_rfp_data(): | |
st.session_state.clear() | |
def export(data): | |
# data_df = pd.DataFrame(st.session_state["user_stories_json"]) | |
data_df = pd.DataFrame(data) | |
csv_data = data_df.to_csv(index=False) | |
b64 = base64.b64encode(csv_data.encode()).decode() | |
href = f'<a href="data:file/csv;base64,{b64}" download="data.csv">Download CSV File</a>' | |
st.markdown(href, unsafe_allow_html=True) | |
def estimate_to_value(estimate): | |
if estimate == "XS": | |
return 2 | |
elif estimate == "S": | |
return 6 | |
elif estimate == "M": | |
return 12 | |
elif estimate == "L": | |
return 22 | |
elif estimate == "XL": | |
return 37 | |
else: | |
# Handle the case when the estimate is not one of the specified values | |
return "Invalid estimate" | |