Could be a good idea implement a grupby inside of API module, this allow us to use methods on each group.
The main idea is can do:
import ineqpy as inq
data = inq.api.Survey(data, weights='w', group='county')
data.groupby(data.county).gini('income')
data.groupby(data.county).atkinson('income')
and then obtain the gini or atkinson index by county.
Could be a good idea implement a grupby inside of API module, this allow us to use methods on each group.
The main idea is can do:
and then obtain the gini or atkinson index by county.