In pandas, you can use the following command:
DallasData.groupby('active_status').size();
The following is the output to the preceding commands:
Count of active and inactive customers using groupby in Python
Different aggregation operations can be applied to two different columns simultaneously while aggregating. The following example shows how to do that.