.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/data_integrity/plot_columns_info.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_checks_gallery_tabular_data_integrity_plot_columns_info.py: .. _plot_tabular_columns_info: Columns Info ************ This notebook provides an overview for using and understanding the columns info check. **Structure:** * `What are columns info <#what-are-columns-info>`__ * `Generating data <#generating-data>`__ * `Run the check <#running-columns-info-check>`__ .. GENERATED FROM PYTHON SOURCE LINES 19-22 What are columns info ======================= The ``ColumnsInfo`` check returns the role and logical type of each column (e.g. date, categorical, numerical etc.). .. GENERATED FROM PYTHON SOURCE LINES 25-27 Imports ======= .. GENERATED FROM PYTHON SOURCE LINES 27-33 .. code-block:: default import numpy as np import pandas as pd from deepchecks.tabular import Dataset from deepchecks.tabular.checks import ColumnsInfo .. GENERATED FROM PYTHON SOURCE LINES 34-36 Generating data =============== .. GENERATED FROM PYTHON SOURCE LINES 36-47 .. code-block:: default num_fe = np.random.rand(500) cat_fe = np.random.randint(3, size=500) num_col = np.random.rand(500) date = range(1635693229, 1635693729) index = range(500) data = {'index': index, 'date': date, 'a': cat_fe, 'b': num_fe, 'c': num_col, 'label': cat_fe} df = pd.DataFrame.from_dict(data) dataset = Dataset(df, label='label', datetime_name='date', index_name='index', features=['a', 'b'], cat_features=['a']) .. GENERATED FROM PYTHON SOURCE LINES 48-50 Running columns info check ========================== .. GENERATED FROM PYTHON SOURCE LINES 50-53 .. code-block:: default check = ColumnsInfo() .. GENERATED FROM PYTHON SOURCE LINES 54-56 .. code-block:: default check.run(dataset=dataset) .. raw:: html
Columns Info


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.038 seconds) .. _sphx_glr_download_checks_gallery_tabular_data_integrity_plot_columns_info.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_columns_info.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_columns_info.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_