exploratory data analysis standard machine learning and analytics workflow recommend processingcleaninganalyzingand visualizing your data before moving on toward modeling your data we will also follow the same workflow we used in all our other you can refer to the python file titled exploratory_data_analysis py for all the code used in this section or use the jupyter notebook titled exploratory data analysis ipynb for more interactive experience process and merge datasets let' load the following necessary dependencies and configuration settings import pandas as pd import matplotlib pyplot as plt import matplotlib as mpl import numpy as np import seaborn as sns %matplotlib inline we will now process the datasets (red and white wineand add some additional variables that we would want to predict in future sections the first variable we will add is wine_typewhich would be either red or white wine based on the dataset and the wine sample the second variable we will add is quality_labelwhich is qualitative measure of the quality of the wine sample based on the quality variable score the rules used for mapping quality to quality_label are described as follows wine quality scores of and are mapped to low quality wines under the quality_label attribute wine quality scores of and are mapped to medium quality wines under the quality_label attribute wine quality scores of and are mapped to high quality wines under the quality_label attribute after adding these attributeswe also merge the two datasets for red and white wine together to create single dataset and we use pandas to merge and shuffle the records of the data frame the following snippet helps us in achieving this in [ ]white_wine pd read_csv('winequality-white csv'sep=';'red_wine pd read_csv('winequality-red csv'sep=';'store wine type as an attribute red_wine['wine_type''redwhite_wine['wine_type''whitebucket wine quality scores into qualitative quality labels red_wine['quality_label'red_wine['quality'apply(lambda value'lowif value < else 'mediumif value < else 'high'red_wine['quality_label'pd categorical(red_wine['quality_label']categories=['low''medium''high']white_wine['quality_label'white_wine['quality'apply(lambda value'low