edaflow.display_column_types

edaflow.display_column_types(df)[source]

Display categorical and numerical columns in a DataFrame with rich formatting.

This function separates DataFrame columns into categorical (object dtype) and numerical (non-object dtypes) columns and displays them in a clear format.

Parameters:

dfpandas.DataFrame

The DataFrame to analyze

Returns:

dict

Dictionary containing ‘categorical’ and ‘numerical’ lists of column names

Example:

>>> import pandas as pd
>>> from edaflow import display_column_types
>>>
>>> # Create sample data
>>> data = {
...     'name': ['Alice', 'Bob', 'Charlie'],
...     'age': [25, 30, 35],
...     'city': ['NYC', 'LA', 'Chicago'],
...     'salary': [50000, 60000, 70000],
...     'is_active': [True, False, True]
... }
>>> df = pd.DataFrame(data)
>>>
>>> # Display column types
>>> result = display_column_types(df)
>>> print("Categorical columns:", result['categorical'])
>>> print("Numerical columns:", result['numerical'])