Spaces:
Runtime error
Runtime error
Zack
commited on
Commit
·
5583051
1
Parent(s):
55913f5
fix: Drop all null columns
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def plot_anomalies(df_test_value, data, anomalies):
|
|
61 |
|
62 |
def clean_data(df):
|
63 |
# Drop rows with any null data
|
64 |
-
|
65 |
|
66 |
# Check if the DataFrame already contains the correct columns
|
67 |
if "timestamp" in df.columns and "value" in df.columns:
|
@@ -99,6 +99,7 @@ def clean_data(df):
|
|
99 |
|
100 |
# Drop rows where 'value' is NaN
|
101 |
df = df.dropna(subset=['value'])
|
|
|
102 |
|
103 |
return df
|
104 |
|
|
|
61 |
|
62 |
def clean_data(df):
|
63 |
# Drop rows with any null data
|
64 |
+
df = df.dropna()
|
65 |
|
66 |
# Check if the DataFrame already contains the correct columns
|
67 |
if "timestamp" in df.columns and "value" in df.columns:
|
|
|
99 |
|
100 |
# Drop rows where 'value' is NaN
|
101 |
df = df.dropna(subset=['value'])
|
102 |
+
df = df.dropna(subset=['timestamp'])
|
103 |
|
104 |
return df
|
105 |
|