diff --git a/pittgoogle/alert.py b/pittgoogle/alert.py index 1f7bca9..d805b78 100644 --- a/pittgoogle/alert.py +++ b/pittgoogle/alert.py @@ -295,9 +295,9 @@ def dataframe(self) -> "pd.DataFrame": import pandas as pd # always lazy-load pandas. it hogs memory on cloud functions and run # sources and previous sources are expected to have the same fields - sources_df = pd.DataFrame([self.get("source")] + self.get("prv_sources")) + sources_df = pd.DataFrame([self.get("source")] + self.get("prv_sources", [])) # sources and forced sources may have different fields - forced_df = pd.DataFrame(self.get("prv_forced_sources")) + forced_df = pd.DataFrame(self.get("prv_forced_sources", [])) # use nullable integer data type to avoid converting ints to floats # for columns in one dataframe but not the other