Learn practical skills, build real-world projects, and advance your career
'''Import basic modules'''
import pandas as pd
import numpy as np
import string


'''import visualization'''
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("ticks")
%matplotlib inline

import matplotlib.gridspec as gridspec

'''Plotly visualization .'''
import plotly.offline as py
import plotly.graph_objs as go
import plotly.tools as tls
py.init_notebook_mode(connected=True)

'''Display markdown formatted output like bold, italic bold etc.'''
from IPython.display import Markdown
def bold(string):
    display(Markdown(string))

'''Ignore deprecation and future, and user warnings.'''
import warnings as wrn
wrn.filterwarnings('ignore', category = DeprecationWarning) 
wrn.filterwarnings('ignore', category = FutureWarning) 
wrn.filterwarnings('ignore', category = UserWarning) 
# Load data
BI = pd.read_csv('../Desktop/android_bids_us.csv')
print(BI.shape)
(3148828, 12)
def graph_insight(BI):
    print(set(BI.dtypes.tolist()))
    df_num = BI.select_dtypes(include = ['float64', 'int64'])
    df_num.hist(figsize=(16, 16), bins=50, xlabelsize=8, ylabelsize=8);
graph_insight(BI)
{dtype('int64'), dtype('O')}
Notebook Image
from pandas_profiling import ProfileReport
import matplotlib.gridspec as gridspec
profile = ProfileReport(train, minimal=True)
profile
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\IPython\core\formatters.py in __call__(self, obj) 343 method = get_real_method(obj, self.print_method) 344 if method is not None: --> 345 return method() 346 return None 347 else: ~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in _repr_html_(self) 222 def _repr_html_(self): 223 """The ipython notebook widgets user interface gets called by the jupyter notebook.""" --> 224 self.to_widgets() 225 226 def __repr__(self): ~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in to_widgets(self) 210 from IPython.core.display import display, HTML 211 --> 212 report = WidgetReport(self.report).render() 213 214 display(report) ~\Anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\flavours.py in WidgetReport(structure) 59 60 def WidgetReport(structure: Type[Renderable]): ---> 61 from pandas_profiling.report.presentation.flavours.widget import ( 62 WidgetSequence, 63 WidgetPreview, ~\Anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\__init__.py in <module> 10 from pandas_profiling.report.presentation.flavours.widget.preview import WidgetPreview 11 from pandas_profiling.report.presentation.flavours.widget.sequence import WidgetSequence ---> 12 from pandas_profiling.report.presentation.flavours.widget.table import WidgetTable 13 from pandas_profiling.report.presentation.flavours.widget.dataset import WidgetDataset 14 from pandas_profiling.report.presentation.flavours.widget.sample import WidgetSample ~\Anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\table.py in <module> ----> 1 from ipywidgets import widgets, GridspecLayout 2 3 from pandas_profiling.report.formatters import fmt 4 from pandas_profiling.report.presentation.core.table import Table 5 ImportError: cannot import name 'GridspecLayout'