def main(): cat_cols = ['GRADELEVEL', 'EDUCATION_LEVEL', 'LEAVING', 'AGENCY'] data = munge_funcs.import_data() data_fm = munge_funcs.df_clean(data, cat_cols, 'Financial Management Satisfaction') data_hr = munge_funcs.df_clean(data, cat_cols, 'Human Capital Satisfaction') data_it = munge_funcs.df_clean(data, cat_cols, 'IT Function Satisfaction') data_acq = munge_funcs.df_clean( data, cat_cols, 'Contracting Function Quality of Support Satisfaction') #return data_fm,data_hr,data_it,data_acq data_fm.to_csv('fm_data.csv') data_hr.to_csv('hr_data.csv') data_it.to_csv('it_data.csv') data_acq.to_csv('acq_data.csv')
def test_target_names_acq(self): target = 'Contracting Function Quality of Support Satisfaction' result = munge_funcs.df_clean(self.test_df,self.cat_cols,target) expected_cols = ['TELEWORK', 'YRSAGENCY2', 'SUP_STATUS', 'AGE', target, 'GRADELEVEL_GS-12', 'GRADELEVEL_GS-13', 'EDUCATION_LEVEL_High School Diploma, GED, or Equivalent', 'EDUCATION_LEVEL_Master\'s Degree', 'LEAVING_No', 'LEAVING_Yes - to take another job', 'AGENCY_Department of Justice', 'AGENCY_Department of Veterans Affairs', 'intercept'] self.assertEqual(list(result.columns).sort(),list(expected_cols).sort())