Skip to content

Commit

Permalink
[PLAT-1131] Correlation and rendering hardening.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: b25cab27c9283053cb712dca49346642a5a42cd6
  • Loading branch information
tylersbray committed Sep 27, 2023
1 parent 02dac67 commit 69a2d34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gretel_synthetics/utils/stats.py
Expand Up @@ -301,6 +301,10 @@ def calculate_correlation(
A dataframe of correlation values.
"""
# PLAT-1131 Ensure that all nominal columns are present in df.
if nominal_columns is not None:
_df_cols = df.columns
nominal_columns = [col for col in nominal_columns if col in _df_cols]
# If opt is True, then go the faster (just not quite as accurate) route of global replace missing with 0
if opt:
with pd.option_context("mode.use_inf_as_na", True):
Expand Down

0 comments on commit 69a2d34

Please sign in to comment.