671ed2bdfa75d7fe2bebe6f63eb928260e40b7af,src/guess.py,,keyable_p,#Any#,272
Before Change
if any(v is None or (isinstance(v, float) and math.isnan(v))
for v in column):
return False
if all(isinstance(v, int) for v in column):
return len(column) == len(unique(column))
return False
def numerical_p(column, count_cutoff, ratio_cutoff):
nu = len(unique([v for v in column if not math.isnan(v)]))
After Change
for v in column):
return False
try:
column_floats = [float(v) for v in column]
if not all(v.is_integer() for v in column_floats):
return False
return len(column) == len(unique(column))
except ValueError:
return len(column) == len(unique(column))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 10
Instances
Project Name: probcomp/bayeslite
Commit Name: 671ed2bdfa75d7fe2bebe6f63eb928260e40b7af
Time: 2017-01-30
Author: curlette@mit.edu
File Name: src/guess.py
Class Name:
Method Name: keyable_p
Project Name: commonsense/conceptnet5
Commit Name: f1fc699be9ce8b249cf5bd670d2200f990a5294d
Time: 2016-09-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/evaluation/analogy.py
Class Name:
Method Name: eval_analogies
Project Name: pantsbuild/pants
Commit Name: 937907d721b8e4e9628b6d13bb59423e4406a5f1
Time: 2015-04-20
Author: itay@twitter.com
File Name: src/python/pants/backend/python/tasks/pytest_run.py
Class Name: PytestRun
Method Name: run_tests
Project Name: IndicoDataSolutions/finetune
Commit Name: 2d41bb82695f1cc18333e6bcba3d1b00befad89e
Time: 2020-01-17
Author: benlt@hotmail.co.uk
File Name: finetune/target_models/sequence_labeling.py
Class Name: SequencePipeline
Method Name: text_to_tokens_mask