M17idd commited on
Commit
38abfed
·
verified ·
1 Parent(s): 0bc57e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -55,7 +55,7 @@ with ui.layout_columns(fill=False):
55
  def average_tip():
56
  d = tips_data()
57
  if d.shape[0] > 0:
58
- perc = d.tip / d.total_bill
59
  f"{perc.mean():.1%}"
60
 
61
  with ui.value_box(showcase=ICONS["currency-dollar"]):
@@ -65,7 +65,7 @@ with ui.layout_columns(fill=False):
65
  def average_bill():
66
  d = tips_data()
67
  if d.shape[0] > 0:
68
- bill = d.total_bill.mean()
69
  f"${bill:.2f}"
70
 
71
 
@@ -94,8 +94,8 @@ with ui.layout_columns(col_widths=[6, 6, 12]):
94
  color = input.scatter_color()
95
  return px.scatter(
96
  tips_data(),
97
- x="total_bill",
98
- y="tip",
99
  color=None if color == "none" else color,
100
  trendline="lowess",
101
  )
@@ -118,7 +118,7 @@ with ui.layout_columns(col_widths=[6, 6, 12]):
118
  from ridgeplot import ridgeplot
119
 
120
  dat = tips_data()
121
- dat["percent"] = dat.tip / dat.total_bill
122
  yvar = input.tip_perc_y()
123
  uvals = dat[yvar].unique()
124
 
 
55
  def average_tip():
56
  d = tips_data()
57
  if d.shape[0] > 0:
58
+ perc = d.tip / d.سن
59
  f"{perc.mean():.1%}"
60
 
61
  with ui.value_box(showcase=ICONS["currency-dollar"]):
 
65
  def average_bill():
66
  d = tips_data()
67
  if d.shape[0] > 0:
68
+ bill = d.سن.mean()
69
  f"${bill:.2f}"
70
 
71
 
 
94
  color = input.scatter_color()
95
  return px.scatter(
96
  tips_data(),
97
+ x="سن",
98
+ y="id",
99
  color=None if color == "none" else color,
100
  trendline="lowess",
101
  )
 
118
  from ridgeplot import ridgeplot
119
 
120
  dat = tips_data()
121
+ dat["percent"] = dat.tip / dat.سن
122
  yvar = input.tip_perc_y()
123
  uvals = dat[yvar].unique()
124