fix(histogram): add NULL handling for histogram (#35693)

Co-authored-by: Rachel Pan <r.pan@mail.utoronto.ca>
Co-authored-by: Rachel Pan <panrrachel@gmail.com>
Co-authored-by: Janani Gurram <68124448+JG-ctrl@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Janani Gurram
2025-11-14 14:54:13 -05:00
committed by GitHub
parent e6a5616543
commit c955a5dc08
2 changed files with 72 additions and 0 deletions

View File

@@ -48,6 +48,11 @@ def histogram(
if groupby is None:
groupby = []
# drop empty values from the target column
df = df.dropna(subset=[column])
if df.empty:
return df
# convert to numeric, coercing errors to NaN
df[column] = to_numeric(df[column], errors="coerce")