.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "glr_examples/base/plot_missing.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_glr_examples_base_plot_missing.py: ================================= Plot data with missing features ================================= plots the missing features and extracts insight with their correlation .. GENERATED FROM PYTHON SOURCE LINES 8-11 .. code-block:: Python # Author: L.Kouadio # Licence: BSD-3-clause .. GENERATED FROM PYTHON SOURCE LINES 12-16 :class:`Missing` inherits from :class:`Data` and use :mod:`missingno`. Install the package :code:`missingno` for taking advantage of many missing plot. The parameter `kind` is passed to :class:`Missing` for selecting the kind of plot for visualisation: .. GENERATED FROM PYTHON SOURCE LINES 18-19 Plot the missing in the data using the base visualization .. GENERATED FROM PYTHON SOURCE LINES 19-25 .. code-block:: Python from watex.datasets import fetch_data from watex.base import Missing data= fetch_data("bagoue original").get('data=df') # num flow ms= Missing().fit (data) ms.plot(figsize = (12, 4 )) .. image-sg:: /glr_examples/base/images/sphx_glr_plot_missing_001.png :alt: plot missing :srcset: /glr_examples/base/images/sphx_glr_plot_missing_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Missing(in_percent= False, kind= None, sample= None, ... , lwi= 0 32.023585 1 21.406531 2 0.0 3 28.709623 4 2.3 ... 426 18.6 427 40.1 428 28.5 429 1.5 430 33.85 Name= lwi, Length= 431, dtype= object, geol= 0 VOLCANO-SEDIM. SCHISTS 1 GRANITES 2 GRANITES 3 GRANITES 4 GEOSYN. GRANITES ... 426 GEOSYN. GRANITES 427 GRANITES 428 GRANITES 429 GRANITES 430 GEOSYN. GRANITES Name= geol, Length= 431, dtype= object, flow= 0 2.0 1 0.0 2 1.0 3 1.0 4 1.0 ... 426 10.0 427 2.0 428 5.0 429 4.0 430 2.0 Name= flow, Length= 431, dtype= object) .. GENERATED FROM PYTHON SOURCE LINES 26-28 Plot the same missing data using the correlation visualization .. GENERATED FROM PYTHON SOURCE LINES 28-30 .. code-block:: Python ms.kind='corr' ms.plot(figsize = (12, 4 )) .. image-sg:: /glr_examples/base/images/sphx_glr_plot_missing_002.png :alt: plot missing :srcset: /glr_examples/base/images/sphx_glr_plot_missing_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Missing(in_percent= False, kind= corr, sample= None, ... , lwi= 0 32.023585 1 21.406531 2 0.0 3 28.709623 4 2.3 ... 426 18.6 427 40.1 428 28.5 429 1.5 430 33.85 Name= lwi, Length= 431, dtype= object, geol= 0 VOLCANO-SEDIM. SCHISTS 1 GRANITES 2 GRANITES 3 GRANITES 4 GEOSYN. GRANITES ... 426 GEOSYN. GRANITES 427 GRANITES 428 GRANITES 429 GRANITES 430 GEOSYN. GRANITES Name= geol, Length= 431, dtype= object, flow= 0 2.0 1 0.0 2 1.0 3 1.0 4 1.0 ... 426 10.0 427 2.0 428 5.0 429 4.0 430 2.0 Name= flow, Length= 431, dtype= object) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.374 seconds) .. _sphx_glr_download_glr_examples_base_plot_missing.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/watex/watex/0.3.X?urlpath=lab/tree/notebooks/glr_examples/base/plot_missing.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_missing.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_missing.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_