BlendMMM commited on
Commit
2793b42
1 Parent(s): 7a2cc57

Update pages/2_Transformations_and_Model_Build.py

Browse files
pages/2_Transformations_and_Model_Build.py CHANGED
@@ -73,7 +73,7 @@ st.title('1. Build Your Model')
73
  date_col = 'date'
74
 
75
 
76
- media_data=pd.read_excel(r'upf_data_converted.xlsx')
77
  # with open("Pickle_files/main_df",'rb') as f:
78
  # media_data= pickle.load(f)
79
 
@@ -94,13 +94,13 @@ media_data.drop([date_col],axis=1,inplace=True)
94
  media_data.reset_index(drop=True,inplace=True)
95
 
96
 
97
- if st.toggle('Apply Transformations on DMA/Panel Level'):
98
- dma=st.selectbox('Select the Level of data ',[ col for col in media_data.columns if col.lower() in ['dma','panel', 'markets']])
99
- panel_col= dma
100
-
101
- else:
102
- #""" code to aggregate data on date """
103
 
 
 
104
 
105
  dma=None
106
 
 
73
  date_col = 'date'
74
 
75
 
76
+ media_data=pd.read_excel('upf_data_converted.xlsx')
77
  # with open("Pickle_files/main_df",'rb') as f:
78
  # media_data= pickle.load(f)
79
 
 
94
  media_data.reset_index(drop=True,inplace=True)
95
 
96
 
97
+ selection=[ col for col in media_data.columns if col.lower() in ['panel','Panel_2', 'markets']]
98
+ selection.append('NA')
99
+ dma=st.selectbox('Select the Level of data ',selection)
100
+ panel_col= dma
 
 
101
 
102
+ if dma=='NA':
103
+ panel_col=None
104
 
105
  dma=None
106