INNER CODE UNIT · Python

describe

ashishpatel26/Amazing-Feature-Engineering · data_exploration/explore.py:50

def describe(data,output_path=None):
    """output the general description of a  pandas Dataframe
       into a csv file
    
    """
    
    result = data.describe(include='all')
    if output_path is not None:
        output = os.path.join(output_path,'describe.csv')
        result.to_csv(output)
        print('result saved at:', str(output))
    return result
    
    
def discrete_var_barplot(x,y,data,output_path=None):
    """draw the barplot of a discrete variable x against y(target variable). 
    By default the bar shows the mean value of y.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…