Zack commited on
Commit
0702187
·
1 Parent(s): 287c811

fix: Drop null columns

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -60,6 +60,9 @@ def plot_anomalies(df_test_value, data, anomalies):
60
  return fig
61
 
62
  def clean_data(df):
 
 
 
63
  # Check if the DataFrame already contains the correct columns
64
  if "timestamp" in df.columns and "value" in df.columns:
65
  df["timestamp"] = pd.to_datetime(df["timestamp"])
 
60
  return fig
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:
68
  df["timestamp"] = pd.to_datetime(df["timestamp"])