Repository: sfu-db/dataprep
Issue: Create report failed with top women chess players dataset

**Describe the bug**
Download the dataset and run `create_report` on it will produce an error.
https://www.kaggle.com/vikasojha98/top-women-chess-players

**To Reproduce**
```python
df = pd.read_csv(...)
create_report(df)
```

**Expected behavior**
No error raised.

**Screenshots**
```
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-31-463fb2fdfb17> in <module>
----> 1 create_report(df)

~/projects/dataprep/dataprep/eda/create_report/__init__.py in create_report(df, title, mode, progress)
     50         "resources": INLINE.render(),
     51         "title": title,
---> 52         "components": format_report(df, mode, progress),
     53     }
     54     template_base = ENV_LOADER.get_template("base.html")

~/projects/dataprep/dataprep/eda/create_report/formatter.py in format_report(df, mode, progress)
     57         df = to_dask(df)
     58         if mode == "basic":
---> 59             comps = format_basic(df)
     60         # elif mode == "full":
     61         #     comps = format_full(df)

~/projects/dataprep/dataprep/eda/create_report/formatter.py in format_basic(df)
    109                 col=col, data=data[col], visual_type="categorical_column"
    110             )
--> 111             rndrd = render(itmdt, plot_height_lrg=250, plot_width_lrg=280)
    112             stats = format_cat_stats(
    113                 data[col]["stats"], data[col]["len_stats"], data[col]["letter_stats"]

~/projects/dataprep/dataprep/eda/distribution/render.py in render(itmdt, yscale, tile_size, plot_width_sml, plot_height_sml, plot_width_lrg, plot_height_lrg, plot_width_wide)
   2111         )
   2112     elif itmdt.visual_type == "categorical_column":
-> 2113         visual_elem = render_cat(itmdt, yscale, plot_width_lrg, plot_height_lrg)
   2114     elif itmdt.visual_type == "numerical_column":
   2115         visual_elem = render_num(itmdt, yscale, plot_width_lrg, plot_height_lrg)

~/projects/dataprep/dataprep/eda/distribution/render.py in render_cat(itmdt, yscale, plot_width, plot_height)
   1674     tabs = Tabs(tabs=tabs)
   1675     # insights
-> 1676     nom_insights(data, col)
   1677     # TODO return insights
   1678     return tabs

~/projects/dataprep/dataprep/eda/distribution/render.py in nom_insights(data, col)
   1727     ## if cfg.insight.attribution_enable
   1728     if data["pie"][:2].sum() / data["nrows"] > 0.5:
-> 1729         vals = ", ".join(data["pie"].index[i] for i in range(2))
   1730         ins["pie"].append(f"The top 2 categories ({vals}) take over 50%")
   1731 

~/projects/dataprep/dataprep/eda/distribution/render.py in <genexpr>(.0)
   1727     ## if cfg.insight.attribution_enable
   1728     if data["pie"][:2].sum() / data["nrows"] > 0.5:
-> 1729         vals = ", ".join(data["pie"].index[i] for i in range(2))
   1730         ins["pie"].append(f"The top 2 categories ({vals}) take over 50%")
   1731 

~/projects/dataprep/.venv/lib/python3.7/site-packages/pandas/core/indexes/base.py in __getitem__(self, key)
   3928         if is_scalar(key):
   3929             key = com.cast_scalar_indexer(key)
-> 3930             return getitem(key)
   3931 
   3932         if isinstance(key, slice):

IndexError: index 1 is out of bounds for axis 0 with size 1
```


Changed files:
dataprep/eda/distribution/render.py

diff --git a/dataprep/eda/distribution/render.py b/dataprep/eda/distribution/render.py
index 6303092e..7f9a3822 100644
--- a/dataprep/eda/distribution/render.py
+++ b/dataprep/eda/distribution/render.py
@@ -1725,7 +1725,7 @@ def nom_insights(data: Dict[str, Any], col: str) -> Dict[str, List[str]]:
         )
 
     ## if cfg.insight.attribution_enable
-    if data["pie"][:2].sum() / data["nrows"] > 0.5:
+    if data["pie"][:2].sum() / data["nrows"] > 0.5 and len(data["pie"]) >= 2:
         vals = ", ".join(data["pie"].index[i] for i in range(2))
         ins["pie"].append(f"The top 2 categories ({vals}) take over 50%")