INNER CODE UNIT · Python

heatmap

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

def heatmap(data,output_path=None,fmt='d'):
    """draw the heatmap between 2 variables.

    Parameters
    ----------


    Returns
    -------
    figure save as PNG
    """    
    
    fig, ax = plt.subplots()
    fig.set_size_inches(11,11)
    sns.heatmap(data,cmap="YlGnBu",linewidths=.5,annot=True,fmt=fmt)
    if output_path is not None:
        output = os.path.join(output_path,'Heatmap'+'.png')
        plt.savefig(output)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…