class_docstr_tok: []
docstr: Helper function for _get_statistical_significance() (via
  _calculate_significance() function). Convert dataframe to samples for
  given attribute group.
  
  :param original_df: a dataframe containing a required raw 'score' column
      and possible raw 'label_value' column.
  :param attribute: Attribute of interest in dataset (ex: race, sex, age
      category)
  :param measure: Metric of interest for which to calculate significance
      (false positives, false negatives, score, label_value)
  
  :return: A dictionary of binary 'samples' for each attribute group
docstr_tok: ["Helper","function","for","_get_statistical_significance","(",")","(","via","_calculate_significance","(",")","function",")",".","Convert","dataframe","to","samples","for","given","attribute","group",".",":","param","original_df",":","a","dataframe","containing","a","required","raw","'score","'","column","and","possible","raw","'label_value","'","column",".",":","param","attribute",":","Attribute","of","interest","in","dataset","(","ex",":","race",",","sex",",","age","category",")",":","param","measure",":","Metric","of","interest","for","which","to","calculate","significance","(","false","positives",",","false","negatives",",","score",",","label_value",")",":","return",":","A","dictionary","of","binary","'samples","'","for","each","attribute","group"]
code: def _get_measure_sample(original_df, attribute, measure):
      """
      Helper function for _get_statistical_significance() (via
      _calculate_significance() function). Convert dataframe to samples for
      given attribute group.
  
      :param original_df: a dataframe containing a required raw 'score' column
          and possible raw 'label_value' column.
      :param attribute: Attribute of interest in dataset (ex: race, sex, age
          category)
      :param measure: Metric of interest for which to calculate significance
          (false positives, false negatives, score, label_value)
  
      :return: A dictionary of binary 'samples' for each attribute group
      """
      return (
          original_df.groupby(attribute)
          .apply(
              lambda f: f.loc[
                  f[measure].notnull(), measure
              ].values.tolist()
          )
          .to_dict()
      )
  
imports: import logging
  from aequitas.plotting import assemble_ref_groups
  import numpy
  import pandas
  from scipy import stats
label_desc: Use image node_id 7 for calling the Bias obj's underlying member method code with example usage: obj._get_measure_sample(original_df, attribute, measure) and returns: original_df