daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def gpu_load_performance_csv(performance_path, **kwargs):
  2.     """ Loads performance data
  3.     Returns
  4.     -------
  5.     GPU DataFrame
  6.     """
  7.     chronometer = Chronometer.makeStarted()
  8.  
  9.     cols = [
  10.         "loan_id", "monthly_reporting_period", "servicer", "interest_rate", "current_actual_upb",
  11.         "loan_age", "remaining_months_to_legal_maturity", "adj_remaining_months_to_maturity",
  12.         "maturity_date", "msa", "current_loan_delinquency_status", "mod_flag", "zero_balance_code",
  13.         "zero_balance_effective_date", "last_paid_installment_date", "foreclosed_after",
  14.         "disposition_date", "foreclosure_costs", "prop_preservation_and_repair_costs",
  15.         "asset_recovery_costs", "misc_holding_expenses", "holding_taxes", "net_sale_proceeds",
  16.         "credit_enhancement_proceeds", "repurchase_make_whole_proceeds", "other_foreclosure_proceeds",
  17.         "non_interest_bearing_upb", "principal_forgiveness_upb", "repurchase_make_whole_proceeds_flag",
  18.         "foreclosure_principal_write_off_amount", "servicing_activity_indicator"
  19.     ]
  20.  
  21.     dtypes = OrderedDict([
  22.         ("loan_id", "int64"),
  23.         ("monthly_reporting_period", "date"),
  24.         ("servicer", "category"),
  25.         ("interest_rate", "float64"),
  26.         ("current_actual_upb", "float64"),
  27.         ("loan_age", "float64"),
  28.         ("remaining_months_to_legal_maturity", "float64"),
  29.         ("adj_remaining_months_to_maturity", "float64"),
  30.         ("maturity_date", "date"),
  31.         ("msa", "float64"),
  32.         ("current_loan_delinquency_status", "int32"),
  33.         ("mod_flag", "category"),
  34.         ("zero_balance_code", "category"),
  35.         ("zero_balance_effective_date", "date"),
  36.         ("last_paid_installment_date", "date"),
  37.         ("foreclosed_after", "date"),
  38.         ("disposition_date", "date"),
  39.         ("foreclosure_costs", "float64"),
  40.         ("prop_preservation_and_repair_costs", "float64"),
  41.         ("asset_recovery_costs", "float64"),
  42.         ("misc_holding_expenses", "float64"),
  43.         ("holding_taxes", "float64"),
  44.         ("net_sale_proceeds", "float64"),
  45.         ("credit_enhancement_proceeds", "float64"),
  46.         ("repurchase_make_whole_proceeds", "float64"),
  47.         ("other_foreclosure_proceeds", "float64"),
  48.         ("non_interest_bearing_upb", "float64"),
  49.         ("principal_forgiveness_upb", "float64"),
  50.         ("repurchase_make_whole_proceeds_flag", "category"),
  51.         ("foreclosure_principal_write_off_amount", "float64"),
  52.         ("servicing_activity_indicator", "category")
  53.     ])
  54.     print(performance_path)
  55.     performance_table = pyblazing.create_table(table_name='perf', type=get_type_schema(performance_path), path=performance_path, delimiter='|', names=cols, dtypes=get_dtype_values(dtypes), skip_rows=1)
  56.     Chronometer.show(chronometer, 'Read Performance CSV')
  57.     return performance_table
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top