Chiragkumar Savani commited on
Commit
7155478
1 Parent(s): 7ad44eb

Issue solved with comma separated numbers

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -109,7 +109,10 @@ def process_csv(file):
109
  # Insert an empty row
110
  df = pd.concat([df.iloc[:idx], pd.DataFrame([{'Separator': 'Separator'}]), df.iloc[idx:]]).reset_index(drop=True)
111
 
112
-
 
 
 
113
  # Calculate global thresholds for HIGH PRICE and LOW PRICE columns
114
  high_price_threshold = calculate_threshold(df['HIGH PRICE'].max(), is_high_price=True)
115
  low_price_threshold = calculate_threshold(df['LOW PRICE'].min(), is_high_price=False)
 
109
  # Insert an empty row
110
  df = pd.concat([df.iloc[:idx], pd.DataFrame([{'Separator': 'Separator'}]), df.iloc[idx:]]).reset_index(drop=True)
111
 
112
+ # df['HIGH PRICE'] = df['HIGH PRICE'].str.replace(',', '')
113
+ price_columns = ['HIGH PRICE', 'LOW PRICE']
114
+ df[price_columns] = df[price_columns].replace({',': ''}, regex=True).apply(pd.to_numeric, errors='coerce')
115
+
116
  # Calculate global thresholds for HIGH PRICE and LOW PRICE columns
117
  high_price_threshold = calculate_threshold(df['HIGH PRICE'].max(), is_high_price=True)
118
  low_price_threshold = calculate_threshold(df['LOW PRICE'].min(), is_high_price=False)