Untitled

 avatar
unknown
plain_text
2 years ago
270 B
4
Indexable
children_pivot = data.pivot_table(index = ['children'], \
                                columns = ['debt'], \
                                values = 'purpose', aggfunc='count')

children_pivot['rate'] = children_pivot[1] / children_pivot[0] * 100
children_pivot
Editor is loading...