mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: mutating input df in viz.py (#11795)
This commit is contained in:
parent
f27ebc4be5
commit
38f67a44ca
@ -1671,6 +1671,7 @@ class DistributionBarViz(BaseViz):
|
||||
# pandas will throw away nulls when grouping/pivoting,
|
||||
# so we substitute NULL_STRING for any nulls in the necessary columns
|
||||
filled_cols = self.groupby + columns
|
||||
df = df.copy()
|
||||
df[filled_cols] = df[filled_cols].fillna(value=NULL_STRING)
|
||||
|
||||
row = df.groupby(self.groupby).sum()[metrics[0]].copy()
|
||||
|
Loading…
Reference in New Issue
Block a user