.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/overview/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_overview_plot_columns_info.py: Columns Info ************ Imports ======= .. GENERATED FROM PYTHON SOURCE LINES 10-17 .. code-block:: default import numpy as np import pandas as pd from deepchecks.tabular import Dataset from deepchecks.tabular.checks.overview import ColumnsInfo .. GENERATED FROM PYTHON SOURCE LINES 18-20 Generating data =============== .. GENERATED FROM PYTHON SOURCE LINES 20-31 .. 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 32-34 Running columns_info check ========================== .. GENERATED FROM PYTHON SOURCE LINES 34-37 .. code-block:: default check = ColumnsInfo() .. GENERATED FROM PYTHON SOURCE LINES 38-40 .. code-block:: default check.run(dataset=dataset) .. raw:: html

Columns Info

Return the role and logical type of each column.

Additional Outputs
* showing only the top 10 columns, you can change it using n_top_columns param
  index date label a b c
role index date label categorical feature numerical feature other


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.009 seconds) .. _sphx_glr_download_checks_gallery_tabular_overview_plot_columns_info.py: .. only :: html .. container:: sphx-glr-footer :class: 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 `_