Skip to content

Instantly share code, notes, and snippets.

@JonasMoss
Created November 2, 2021 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonasMoss/11bd9ed98ba517a850980fc623d67f94 to your computer and use it in GitHub Desktop.
Save JonasMoss/11bd9ed98ba517a850980fc623d67f94 to your computer and use it in GitHub Desktop.
Exercise function!
from collections import Counter
def f(i, s):
total = np.cumsum([0] + list(Counter(coding(s)).values()))
total = total / total[-1]
values = np.diff(total)
return values[i-1]
coding(data_student['apply'],f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment