parse: most formats to date and/or time
from dateutil.parser import parse ser_ts = ser.map(lambda x: parse(x)) ser_ts.dt.dayofweek ser_ts.dt.weekofyear
Counter: count elements
from collections import Counter def frequency_dictionary(words): return Counter(words)
set: returns unique value of array, list
set(my_dictionary.values())
defaultdict(): used when prevent error for non-existing key
from collections import defaultdict def count_first_letters(names): a = defaultdict(lambda : 0) for key in names.key(): a[key[0]] = len(a[key[0]]) + len(names[key]) return a
Comment is the energy for a writer, thanks!