Columns Info#


import numpy as np
import pandas as pd

from deepchecks.tabular import Dataset
from deepchecks.tabular.checks.overview import ColumnsInfo

Generating data#

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'])

Running columns_info check#

check = ColumnsInfo()

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

Total running time of the script: ( 0 minutes 0.009 seconds)

Gallery generated by Sphinx-Gallery