M17idd commited on
Commit
dbaae56
·
verified ·
1 Parent(s): fa380ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -142,12 +142,18 @@ ui.include_css(app_dir / "styles.css")
142
 
143
  @reactive.calc
144
  def tips_data():
145
- سنی = input.سن() # رنج سنی
146
- idx1 = tips["سن"].between(سنی[0], سنی[1]) # فیلتر کردن بر اساس سن
147
- idx2 = tips["تاریخ"].isin(input.time()) # فیلتر کردن بر اساس تاریخ (خدمات)
 
 
 
 
148
  filtered_data = tips[idx1 & idx2] # داده‌های فیلتر شده
149
- print(filtered_data) # برای دیباگ کردن و اطمینان از فیلتر درست
150
- return filtered_dat
 
 
151
 
152
  @reactive.effect
153
  @reactive.event(input.reset)
 
142
 
143
  @reactive.calc
144
  def tips_data():
145
+ سنی = input.سن() # مقدار رنج سنی
146
+ تاریخ_انتخابی = input.time() # تاریخ‌های انتخابی
147
+ print(f"Selected age range: {سنی}")
148
+ print(f"Selected dates: {تاریخ_انتخابی}")
149
+
150
+ idx1 = tips["سن"].between(سنی[0], سنی[1]) # فیلتر بر اساس رنج سنی
151
+ idx2 = tips["تاریخ"].isin(tاریخ_انتخابی) # فیلتر بر اساس تاریخ انتخابی
152
  filtered_data = tips[idx1 & idx2] # داده‌های فیلتر شده
153
+
154
+ print(f"Filtered data: {filtered_data}") # چاپ داده‌های فیلتر شده
155
+
156
+ return filtered_data
157
 
158
  @reactive.effect
159
  @reactive.event(input.reset)