astacn commited on
Commit
1dd65a2
·
verified ·
1 Parent(s): 4d589cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,9 +42,9 @@ data_df['open'] = pd.to_numeric(data_df['open'])
42
  data_df['close'] = pd.to_numeric(data_df['close'])
43
 
44
  # Filter out stocks that meet the conditions
45
- # data_df = data_df[(data_df["open"] >= 0.98 * data_df["close"].shift(1).fillna(0)) & (data_df["open"] <= 1.02 * data_df["close"].shift(1).fillna(0))]
46
- # data_df = data_df[(data_df["high"] == data_df["close"]) & (data_df["low"] == data_df["close"])] # limit-up condition
47
- # data_df = data_df[(data_df["open"]!= 0) & (data_df["close"]!= 0)] # exclude zero prices
48
 
49
  # Check if data_df is empty before proceeding
50
  if data_df.empty:
 
42
  data_df['close'] = pd.to_numeric(data_df['close'])
43
 
44
  # Filter out stocks that meet the conditions
45
+ data_df = data_df[(data_df["open"] >= 0.98 * data_df["close"].shift(1).fillna(0)) & (data_df["open"] <= 1.02 * data_df["close"].shift(1).fillna(0))]
46
+ data_df = data_df[(data_df["high"] == data_df["close"]) & (data_df["low"] == data_df["close"])] # limit-up condition
47
+ data_df = data_df[(data_df["open"]!= 0) & (data_df["close"]!= 0)] # exclude zero prices
48
 
49
  # Check if data_df is empty before proceeding
50
  if data_df.empty: