text_plain_output_1.png
import pandas as pd

df = pd.read_csv('/kaggle/input/heart-disease-dataset/heart.csv')

df.dtypes

feature_list = [feature for feature in df.columns]

discrete_feature = [feature for feature in feature_list if len(df[feature].unique()) < 25]
print('Discrete Variables Count: {}'.format(len(discrete_feature)))
print('Discrete features are ', discrete_feature)
cont_feature = [feature for feature in feature_list if len(df[feature].unique()) > 25]
print('Continuous Variables Count: {}'.format(len(cont_feature)))
print('Continuous features are ', cont_feature)