Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,9 @@ def process_and_save(file):
|
|
| 22 |
df = pd.read_csv(file.name, index_col=False)
|
| 23 |
df.reset_index(drop=True, inplace=True)
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
# Process the DataFrame using your script
|
| 26 |
processed_df = process_csv(df)
|
| 27 |
|
|
|
|
| 22 |
df = pd.read_csv(file.name, index_col=False)
|
| 23 |
df.reset_index(drop=True, inplace=True)
|
| 24 |
|
| 25 |
+
# Check for commas in any of the columns and filter out those rows
|
| 26 |
+
df = df[~df.apply(lambda row: row.astype(str).str.contains(',').any(), axis=1)]
|
| 27 |
+
|
| 28 |
# Process the DataFrame using your script
|
| 29 |
processed_df = process_csv(df)
|
| 30 |
|