Skip to content

Instantly share code, notes, and snippets.

@CharlyWargnier
Created February 8, 2020 17:37
Show Gist options
  • Save CharlyWargnier/ea4f60028812bf9ada61fe540309e66e to your computer and use it in GitHub Desktop.
Save CharlyWargnier/ea4f60028812bf9ada61fe540309e66e to your computer and use it in GitHub Desktop.
DfPivotCodes = df.groupby(['httpCode']).agg({'httpCode': ['count']})
DfPivotCodes.columns = ['_'.join(multi_index) for multi_index in DfPivotCodes.columns.ravel()]
DfPivotCodes = DfPivotCodes.reset_index()
DfPivotCodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment