In [10]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

In [11]:
# read in only relevant removal reason data from 'final_merge_minus_abscondence.csv' 
# commented code uses column index instead of titles

data_df = pd.read_csv('./Improving Foster Care Placements/final_merge_minus_abscondence.csv',  usecols=['CL_ID', 'CLIENT_RMVL', 'Abandonment', 'Alcohol Use/Abuse - Caretaker', 'Alcohol Use/Abuse - Child', 'Death of Parent(s)', 'Domestic Violence', 'Drug Use/Abuse - Caretaker', 'Drug Use/Abuse - Child', 'Incarceration of Parent/Guardian(s)', 'JPO Removal (Child\'s Behavior Problem)', 'Mental/Emotional Injuries', 'Neglect - educational needs', 'Neglect - hygiene/clothing needs', 'Neglect - medical needs', 'Neglect - No/Inadequate Housing', 'Neglect - nutritional needs', 'Neglect - supervision and safety needs', 'Parent\'s inability to cope', 'Parent lacks skills for providing care', 'Parent not seeking BH treatment', 'Parent not seeking BH treatmnt for child', 'Parent/Child Conflict', 'Parent/Guardian lacks skills to provide', 'Physical Abuse', 'Relinquishment', 'Resumption', 'Sexual Abuse', 'Truancy'])
# data_df = pd.read_csv('./Improving Foster Care Placements/final_merge_minus_abscondence.csv', usecols=[0, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])

In [12]:
# Keep only first instance of each child ID, so have one list of removal reasons per child

per_child_df = data_df.drop_duplicates(['CL_ID'])
per_child_df


Out[12]:
CL_ID CLIENT_RMVL Abandonment Alcohol Use/Abuse - Caretaker Alcohol Use/Abuse - Child Death of Parent(s) Domestic Violence Drug Use/Abuse - Caretaker Drug Use/Abuse - Child Incarceration of Parent/Guardian(s) ... Parent lacks skills for providing care Parent not seeking BH treatment Parent not seeking BH treatmnt for child Parent/Child Conflict Parent/Guardian lacks skills to provide Physical Abuse Relinquishment Resumption Sexual Abuse Truancy
0 800035 80003540517 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
5 800038 80003840772 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
8 800043 80004340319 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
19 800044 80004440312 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
21 800045 80004540319 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
26 800046 80004640319 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
30 800047 80004740319 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
34 800048 80004840319 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
37 800056 80005641302 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
38 800078 80007840184 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
40 800088 80008840149 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
42 800095 80009542012 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
44 800096 80009640707 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
56 800138 80013840238 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
61 800139 80013940238 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
68 800176 80017642520 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
69 800179 80017941078 1 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
73 800183 80018341110 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
74 800184 80018441110 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
75 800194 80019442302 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
77 800213 80021340528 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
78 800215 80021541837 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
79 800216 80021641837 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
80 800239 80023940164 0 1 0 0 0 1 0 0 ... 0 0 0 0 0 1 0 0 0 0
82 800240 80024040164 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 1 0 0 0 0
84 800261 80026139731 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
89 800330 80033039745 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
91 800375 80037539800 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
95 800409 80040940379 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
106 800420 80042040695 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
47703 1110599 111059942569 0 0 0 0 0 0 0 0 ... 0 0 0 1 0 0 0 0 0 0
47704 1110602 111060242569 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47705 1110606 111060642578 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
47707 1110826 111082642571 1 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47708 1110882 111088242573 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 1 0
47709 1110985 111098542572 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47710 1111021 111102142576 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47712 1111070 111107042577 0 0 0 0 0 0 0 0 ... 0 1 0 0 0 1 0 0 0 0
47713 1111123 111112342595 0 0 0 0 1 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47714 1111205 111120542578 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
47715 1111290 111129042579 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47716 1111359 111135942584 0 0 0 0 1 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47717 1111521 111152142583 0 0 0 0 0 0 0 1 ... 0 0 0 0 0 0 0 0 0 0
47718 1111618 111161842584 0 0 0 0 1 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47719 1111645 111164542586 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
47720 1111684 111168442584 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
47721 1111710 111171042584 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47722 1111729 111172942585 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47723 1111868 111186842590 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47724 1111880 111188042582 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47725 1111895 111189542586 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47728 1111906 111190642584 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47729 1112008 111200842587 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47730 1112316 111231642592 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47732 1112453 111245342597 0 0 0 0 0 0 0 1 ... 0 0 0 0 0 0 0 0 0 0
47733 1112455 111245542597 0 0 0 0 0 0 0 1 ... 0 0 0 0 0 0 0 0 0 0
47734 1112499 111249942597 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47735 1112507 111250742595 0 0 0 0 1 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
47736 1112560 111256042597 0 1 0 0 1 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
47737 1112723 111272342581 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0

14425 rows × 29 columns


In [13]:
# save data to csv file called 'removal_reason_per_child'

per_child_df.to_csv('./removal_reason_per_child.csv')

In [ ]: