Skip to content

Commit 69a2d34

Browse files
committed
[PLAT-1131] Correlation and rendering hardening.
GitOrigin-RevId: b25cab27c9283053cb712dca49346642a5a42cd6
1 parent 02dac67 commit 69a2d34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gretel_synthetics/utils/stats.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ def calculate_correlation(
301301
A dataframe of correlation values.
302302
303303
"""
304+
# PLAT-1131 Ensure that all nominal columns are present in df.
305+
if nominal_columns is not None:
306+
_df_cols = df.columns
307+
nominal_columns = [col for col in nominal_columns if col in _df_cols]
304308
# If opt is True, then go the faster (just not quite as accurate) route of global replace missing with 0
305309
if opt:
306310
with pd.option_context("mode.use_inf_as_na", True):

0 commit comments

Comments
 (0)