Skip to content

Commit

Permalink
fix(eda):wordcloud setting in terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglinpeng committed Dec 21, 2021
1 parent 67500b5 commit 0090169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dataprep/eda/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
from __future__ import annotations

from typing import Any, Dict, List, Optional, Tuple, Union

from pydantic import BaseModel, Field
from ..utils import is_notebook


# This dictionary map the plot names in display to their canonicalized names in Config
DISPLAY_MAP = {
Expand Down Expand Up @@ -465,7 +466,7 @@ class WordCloud(BaseModel):
Whether to apply Potter Stem on the words
"""

enable: bool = True
enable: bool = is_notebook()
top_words: int = 30
stopword: bool = True
lemmatize: bool = False
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/eda/parameter_configurations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"| `pie.slices`| int | 10 | Maximum number of pie slices to display in the `Pie Chart`|\n",
"| `pie.sort_descending`| bool | True | Whether to sort the slices in descending order of frequency in the `Pie Chart`|\n",
"| `pie.colors` | List[str] | None | Colors of the slices in the `Pie Chart` |\n",
"| `wordcloud.enable` | bool | True | Whether enable `Word Cloud` |\n",
"| `wordcloud.enable` | bool | is_notebook | Whether enable `Word Cloud`. Default True if it's in notebook environment, else False |\n",
"| `wordcloud.height` | int | None | The height of the `Word Cloud`|\n",
"| `wordcloud.width` | int | None | The width of the `Word Cloud` |\n",
"| `wordcloud.top_words`| int | 30 | Maximum number of most frequent words to display in the `Word Cloud`|\n",
Expand Down Expand Up @@ -204,7 +204,7 @@
"| `pie.enable` | bool | True | Whether enable `Pie Chart` |\n",
"| `pie.slices`| int | 10 | Maximum number of pie slices to display in the `Pie Chart`|\n",
"| `pie.sort_descending`| bool | True | Whether to sort the slices in descending order of frequency in the `Pie Chart`|\n",
"| `wordcloud.enable` | bool | True | Whether enable `Word Cloud` |\n",
"| `wordcloud.enable` | bool | is_notebook | Whether enable `Word Cloud`. Default True if it's in notebook environment, else False |\n",
"| `wordcloud.top_words`| int | 30 | Maximum number of most frequent words to display in the `Word Cloud`|\n",
"| `wordcloud.stopword`| bool | True | Whether to remove stopwords in the `Word Cloud`|\n",
"| `wordcloud.lemmatize`| bool | False | Whether to lemmatize the words in the `Word Cloud`|\n",
Expand Down

1 comment on commit 0090169

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataPrep.EDA Benchmarks

Benchmark suite Current: 0090169 Previous: 67500b5 Ratio
dataprep/tests/benchmarks/eda.py::test_create_report 0.2548470193957534 iter/sec (stddev: 0.018968832283531613) 0.2011514197002141 iter/sec (stddev: 0.009585647015040671) 0.79

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.