thealper2 commited on
Commit
b2b748f
1 Parent(s): 5b97a11

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -189,7 +189,8 @@ if year:
189
 
190
  #st.write(test_df)
191
  numerical_variables = [col for col in test.columns if pd.api.types.is_numeric_dtype(test[col])]
192
- test['Publication Day'] = day_encoder.transform(test['Publication Day'].values.reshape(-1, 1))
 
193
  test[numerical_variables] = rs.transform(test[numerical_variables])
194
 
195
  test_small = test[test_df_names]
 
189
 
190
  #st.write(test_df)
191
  numerical_variables = [col for col in test.columns if pd.api.types.is_numeric_dtype(test[col])]
192
+ if test['Publication Day'] != '?':
193
+ test['Publication Day'] = day_encoder.transform(test['Publication Day'].values.reshape(-1, 1))
194
  test[numerical_variables] = rs.transform(test[numerical_variables])
195
 
196
  test_small = test[test_df_names]