Skip to content

Commit f7a0f3f

Browse files
alexbarrosaquemy
authored andcommitted
fix: gen wordcloud only for non-empty cols (#1459)
1 parent d5fb2e6 commit f7a0f3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ydata_profiling/model/pandas/describe_categorical_pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def word_summary_vc(vc: pd.Series, stop_words: List[str] = []) -> dict:
183183
stop_words = [x.lower() for x in stop_words]
184184
word_counts = word_counts.loc[~word_counts.index.isin(stop_words)]
185185

186-
return {"word_counts": word_counts}
186+
return {"word_counts": word_counts} if not word_counts.empty else {}
187187

188188

189189
def length_summary_vc(vc: pd.Series) -> dict:

0 commit comments

Comments
 (0)