Qinglinz commited on
Commit
5558cd0
1 Parent(s): 353dd2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -46,17 +46,17 @@ def titanic(pclass, sex, age, fare, embarked, familysize, appellation, cabin):
46
 
47
  # Appellation
48
  if appellation == "master":
49
- input_list.extend(1,0,0,0,0,0)
50
  elif appellation == "miss":
51
- input_list.extend(0,1,0,0,0,0)
52
  elif appellation == "mr":
53
- input_list.extend(0,0,1,0,0,0)
54
  elif appellation == "mrs":
55
- input_list.extend(0,0,0,1,0,0)
56
  elif appellation == "officer":
57
- input_list.extend(0,0,0,0,1,0)
58
  elif appellation == "royalty":
59
- input_list.extend(0,0,0,0,0,1)
60
 
61
  # Cabin
62
  if cabin == "A":
 
46
 
47
  # Appellation
48
  if appellation == "master":
49
+ input_list.extend([1,0,0,0,0,0])
50
  elif appellation == "miss":
51
+ input_list.extend([0,1,0,0,0,0])
52
  elif appellation == "mr":
53
+ input_list.extend([0,0,1,0,0,0])
54
  elif appellation == "mrs":
55
+ input_list.extend([0,0,0,1,0,0])
56
  elif appellation == "officer":
57
+ input_list.extend([0,0,0,0,1,0])
58
  elif appellation == "royalty":
59
+ input_list.extend([0,0,0,0,0,1])
60
 
61
  # Cabin
62
  if cabin == "A":