Last active
July 16, 2018 15:30
-
-
Save cuckookernel/900649520a0ff1cce704436595b10c18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final_result = ( pairs_filtered[['stalkee', 'stalker', 'location_id']] | |
.unique() | |
.groupby( ['stalkee','stalker'] , | |
{"location_count" : agg.COUNT }) | |
.topk( 'location_count', k=5 ) | |
.materialize() ) | |
print( final_result ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment