pandas-profiling UCI Epileptic Seizure Recognition Scatter Plot


In [1]:
!pip install pandas-profiling


Requirement already satisfied: pandas-profiling in /Users/monkee/anaconda3/lib/python3.6/site-packages
Requirement already satisfied: pandas>=0.19 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas-profiling)
Requirement already satisfied: matplotlib>=1.4 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas-profiling)
Requirement already satisfied: six>=1.9 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas-profiling)
Requirement already satisfied: jinja2>=2.8 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas-profiling)
Requirement already satisfied: python-dateutil>=2 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas>=0.19->pandas-profiling)
Requirement already satisfied: pytz>=2011k in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas>=0.19->pandas-profiling)
Requirement already satisfied: numpy>=1.7.0 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from pandas>=0.19->pandas-profiling)
Requirement already satisfied: cycler>=0.10 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from matplotlib>=1.4->pandas-profiling)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from matplotlib>=1.4->pandas-profiling)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/monkee/anaconda3/lib/python3.6/site-packages (from jinja2>=2.8->pandas-profiling)

Import libraries


In [ ]:
from IPython.core.debugger import set_trace
import pandas as pd
import pandas_profiling
import seaborn as sns
import matplotlib.pyplot as plt

Load and prepare dataset


In [ ]:
data = pd.read_csv("uci-epileptic-seizure-recognition-data.csv", encoding='UTF-8')

data.State = data.State.astype(str)
x = data.loc[:, "X1":]
y = data.State
data

pd.plotting.scatter_matrix(data.loc[:, "X1":"X6"], diagonal="kde")
plt.tight_layout()
plt.show()

#sns.lmplot("X4", "X5", data, hue="State", fit_reg=False)

Inline report without saving object


In [ ]:
pandas_profiling.ProfileReport(df)


--Call--
> /Users/monkee/anaconda3/lib/python3.6/site-packages/IPython/core/displayhook.py(247)__call__()
    245         sys.stdout.flush()
    246 
--> 247     def __call__(self, result=None):
    248         """Printing with history cache management.
    249 

Save report to file


In [ ]:
pfr = pandas_profiling.ProfileReport(df)
pfr.to_file("uci-epileptic-seizure-recognition-profile.html")

In [ ]:
#### Print existing ProfileReport object inline
pfr