Binder badge Colab badge

Columns Info

Imports

[1]:
import pandas as pd
import numpy as np
from deepchecks.checks.overview import ColumnsInfo
from deepchecks.base import Dataset

Generating data:

[2]:
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:

[3]:
check = ColumnsInfo()
[4]:
check.run(dataset=dataset)

Columns Info

Return the role and logical type of each column. Read More...

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