Skip to content

Commit

Permalink
Unwanted fields deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyShrestha committed Jun 8, 2024
1 parent 6ca2a06 commit a3fd945
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Website/pages/cust_purchase_expected_expiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def cust_purchase_expected_expiry():
df = df[df['score']==100]

df = df[["customer_name", "product_name", "purchase_date", "expected_expiry_date"]]
df['customer_name'] = df['customer_name'].str.strip()
df['product_name'] = df['product_name'].str.strip()

# Convert 'purchase_date' and 'expected_expiry_date' to datetime
df['purchase_date'] = pd.to_datetime(df['purchase_date'])
df['expected_expiry_date'] = pd.to_datetime(df['expected_expiry_date'])

df = df[df['expected_expiry_date'] >= df['purchase_date'] + pd.DateOffset(days=10)]
df['customer_name'] = df['customer_name'].str.strip()
df['product_name'] = df['product_name'].str.strip()


distinct_customer = df['customer_name'].drop_duplicates().sort_values().tolist()
Expand Down
2 changes: 1 addition & 1 deletion Website/pages/dynamic_pricing_streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def convert_df_to_csv(df):
st.write("### Select Columns to Display")
all_columns = filtered_df.columns.tolist()
filtered_df = filtered_df[filtered_df['Score']==100]
all_columns = [col for col in all_columns if col not in ['product_in_avg_expiry_file','Score']]
all_columns = [col for col in all_columns if col not in ['product_in_avg_expiry_file','Score','Expiry Date']]
selected_columns = st.multiselect("Select Columns", all_columns, default=all_columns)


Expand Down

0 comments on commit a3fd945

Please sign in to comment.