Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,16 +27,16 @@ if uploaded_files:
|
|
| 27 |
df = pd.read_csv(file)
|
| 28 |
dataframes.append(df)
|
| 29 |
|
| 30 |
-
duplicate_columns = st.checkbox("Remove duplicate columns", value=
|
| 31 |
if duplicate_columns :
|
| 32 |
dataframes.drop_duplicates(inplace=True)
|
| 33 |
|
| 34 |
-
remove_empty_rows = st.checkbox("Remove empty rows", value=
|
| 35 |
if remove_empty_rows :
|
| 36 |
for i, df in enumerate(dataframes):
|
| 37 |
dataframes[i] = df.drop_duplicates(inplace=False)
|
| 38 |
|
| 39 |
-
impute_mean = st.checkbox("Impute missing values with mean (for int and float columns)",value=
|
| 40 |
if impute_mean:
|
| 41 |
for i, df in enumerate(dataframes):
|
| 42 |
numeric_cols = df.select_dtypes(include=['int', 'float']).columns
|
|
|
|
| 27 |
df = pd.read_csv(file)
|
| 28 |
dataframes.append(df)
|
| 29 |
|
| 30 |
+
duplicate_columns = st.checkbox("Remove duplicate columns", value=False)
|
| 31 |
if duplicate_columns :
|
| 32 |
dataframes.drop_duplicates(inplace=True)
|
| 33 |
|
| 34 |
+
remove_empty_rows = st.checkbox("Remove empty rows", value=False)
|
| 35 |
if remove_empty_rows :
|
| 36 |
for i, df in enumerate(dataframes):
|
| 37 |
dataframes[i] = df.drop_duplicates(inplace=False)
|
| 38 |
|
| 39 |
+
impute_mean = st.checkbox("Impute missing values with mean (for int and float columns)",value=False)
|
| 40 |
if impute_mean:
|
| 41 |
for i, df in enumerate(dataframes):
|
| 42 |
numeric_cols = df.select_dtypes(include=['int', 'float']).columns
|