What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-16 06:44:20
group c# objects by object property
using System; using System.Collections.Generic; using System.Linq; namespace LinqGroup { class Program { static void Main(string[] a... Add solution -
Python 2021-11-14 11:46:15
python - count number of values without dupicalte in a second column values
ID, domain 123, 'vk.com' 123, 'vk.com' 123, 'twitter.com' 456, 'vk.com' 456, 'facebook.com' 456, 'vk.com' 456, 'google.com' 789, 'twitter.com' 789, 'vk.com' df = df.groupby('domain')['ID'].nunique() print (df) domain 'facebook.com' 1 'google.com' ... Add solution -
Python 2021-11-13 20:44:16
Pack consecutive duplicates of list elements into sublists python
import itertools def pack_consecutive_duplicates(_list: list): preprocessed_list = [] # x groups the duplicates into a tuple () # x[0] is the duplicate element # x[1] is a grouper iterable that conatins all the duplicate elements for ... Add solution
Best helpers
Ranking is empty