File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,22 @@ def infer_types(
1818 data : pd.DataFrame
1919 The input dataset for which we want to infer data type information.
2020 """
21- if config is None or 'engine' not in config :
21+ # Set global defaults if missing
22+ if config is None :
2223 config = {'engine' : 'rule_based' , 'pct_invalid' : 2 , 'seed' : 420 , 'mp_cutoff' : 1e4 }
24+ elif 'engine' not in config :
25+ config ['engine' ] = 'rule_based'
26+
27+ if 'pct_invalid' not in config :
28+ config ['pct_invalid' ] = 2
29+
30+ if 'seed' not in config :
31+ config ['seed' ] = 420
2332
2433 if config ['engine' ] == ENGINES .RULE_BASED :
34+ if 'mp_cutoff' not in config :
35+ config ['mp_cutoff' ] = 1e4
36+
2537 engine = RuleBasedEngine (config )
2638 return engine .infer (data )
2739 else :
You can’t perform that action at this time.
0 commit comments