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
#!/usr/bin/env python | |
# coding: utf-8 | |
import argparse | |
from math import comb, ceil | |
from matplotlib import pyplot as plt | |
import seaborn as sns | |
import numpy as np | |
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
""" GLOBAL functions: Functions used over several projects. | |
* group_with_freq | |
Author: Juan Sebastian Diaz Boada | |
juansdb93@gmail.com | |
""" | |
import numpy as np | |
import pandas as pd | |
from collections import defaultdict | |
#---------------------------------------------------------------------------------------------------# | |
def group_with_freq(df,col,group_unique=False,new_name=None): |