Skip to content

Commit 3285790

Browse files
committed
Fix issue #36 in structdata module
1 parent ae5e683 commit 3285790

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

datasist/structdata.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,18 @@ def describe(data=None, name='', date_cols=None, show_categories=False, plot_mis
8686
print(num_features)
8787
_space()
8888

89+
print('Categorical Features in Data set')
90+
display(cat_features)
91+
_space()
92+
8993
print('Statistical Description of Columns')
9094
display(data.describe())
9195
_space()
9296

9397
print('Description of Categorical Features')
94-
display(data.describe(include=[np.object, pd.Categorical]).T)
95-
_space()
96-
97-
print('Categorical Features in Data set')
98-
display(cat_features)
99-
_space()
98+
if cat_features != None:
99+
display(data.describe(include=[np.object, pd.Categorical]).T)
100+
_space()
100101

101102
print('Unique class Count of Categorical features')
102103
display(get_unique_counts(data))

0 commit comments

Comments
 (0)