Explore & Visualise

EDA (Exploratory Data Analysis)

src.explore_visualise.eda.var_boxplot(var, data, target, title, xrotate=0)

Create boxplot of variable vs descending median of target and provide frequency table for variable values. Caution: target variable has to be numeric.

Parameters:
datastr

DataFrame to plot and calculate frequencies

varstr

Variable name for analysis. Provide in quotation marks.

targetstr

Target variable name for analysis. Provide in quotation marks.

titlestr

Plot title

xrotateint

Rotation parameter for plt.xticks. By default = 0.

Returns:
Graphsmatplotlib plots

Boxplot and frequency table.

Notes

Required libraries:

  • import matplotlib.pyplot as plt

  • import seaborn as sn

  • import pandas as pd

  • from IPython.display import display, HTML