Repository: sfu-db/dataprep
Issue: create_report on a DataFrame with a datetime64[ns] column results in a uncaught exception

**Describe the bug**
Calling `create_report` on a DataFrame with a datetime64[ns] column results in a uncaught exception: `UnboundLocalError: local variable 'rndrd' referenced before assignment`

**To Reproduce**
Steps to reproduce the behavior:
1. Example dataset
```python
import random
import pandas as pd
from dataprep import eda

weeks = pd.date_range(start='2020-10-01', end='2020-11-04', freq='W')
week_of = [random.choice(weeks) for n in range(random.randint(0, 1_000))]
some_counts = [c for c in range(len(week_of))]
td = pd.DataFrame({'week_of': week_of, 'some_counts': some_counts})
```
2. Create report
```python
report = eda.create_report(td, title='Report with datetime')
```
3. See error
```python
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-10-c4d17e3c9e92> in <module>
----> 1 report = eda.create_report(dist_df, title="Distribution Report")

/usr/local/lib/python3.8/site-packages/dataprep/eda/create_report/__init__.py in create_report(df, title, mode, progress)
     52         "resources": INLINE.render(),
     53         "title": title,
---> 54         "components": format_report(df, mode, progress),
     55     }
     56     template_base = ENV_LOADER.get_template("base.html")

/usr/local/lib/python3.8/site-packages/dataprep/eda/create_report/formatter.py in format_report(df, mode, progress)
     61         df = string_dtype_to_object(df)
     62         if mode == "basic":
---> 63             comps = format_basic(df)
     64         # elif mode == "full":
     65         #     comps = format_full(df)

/usr/local/lib/python3.8/site-packages/dataprep/eda/create_report/formatter.py in format_basic(df)
    121             )
    122         figs: List[Figure] = []
--> 123         for tab in rndrd:
    124             try:
    125                 fig = tab.children[0]

UnboundLocalError: local variable 'rndrd' referenced before assignment
```

**Expected behavior**
I believe in this case the desired behavior is that the dates be treated as categorical and a histogram produced.

**Desktop (please complete the following information):**
 - OS: Mac
 - Browser: chrome
 - Platform: Python script
 - Platform Version: 3.8
 - Python Version: 3.8
 - Dataprep Version: '0.2.14'


Changed files:
dataprep/eda/create_report/formatter.py, dataprep/tests/eda/test_create_report.py, dataprep/eda/distribution/compute/univariate.py

diff --git a/dataprep/eda/create_report/formatter.py b/dataprep/eda/create_report/formatter.py
index 16d1f541..600c4dd4 100644
--- a/dataprep/eda/create_report/formatter.py
+++ b/dataprep/eda/create_report/formatter.py
@@ -15,12 +15,14 @@ from ..correlation import render_correlation
 from ..correlation.compute.nullivariate import correlation_nxn
 from ..data_array import DataArray
 from ..distribution import render
+from ..distribution.compute.common import _calc_line_dt
 from ..distribution.compute.overview import calc_stats
-from ..distribution.compute.univariate import cont_comps, nom_comps
-from ..distribution.render import format_cat_stats, format_num_stats, format_ov_stats
+from ..distribution.compute.univariate import cont_comps, nom_comps, calc_stats_dt
+from ..distribution.render import format_cat_stats, format_num_stats, format_ov_stats, stats_viz_dt
 from ..dtypes import (
     CATEGORICAL_DTYPES,
     Continuous,
+    DateTime,
     Nominal,
     detect_dtype,
     is_dtype,
@@ -111,14 +113,21 @@ def format_basic(df: dd.DataFrame) -> Dict[str, Any]:
         stats: Any = None  # needed for pylint
         if is_dtype(detect_dtype(df[col]), Continuous()):
             itmdt = Intermediate(col=col, data=data[col], visual_type="numerical_column")
-            rndrd = render(itmdt, plot_height_lrg=250, plot_width_lrg=280)["layout"]
             stats = format_num_stats(data[col])
         elif is_dtype(detect_dtype(df[col]), Nominal()):
             itmdt = Intermediate(col=col, data=data[col], visual_type="categorical_column")
-            rndrd = render(itmdt, plot_height_lrg=250, plot_width_lrg=280)["layout"]
             stats = format_cat_stats(
                 data[col]["stats"], data[col]["len_stats"], data[col]["letter_stats"]
             )
+        elif is_dtype(detect_dtype(df[col]), DateTime()):
+            itmdt = Intermediate(
+                col=col,
+                data=data[col]["stats"],
+                line=data[col]["line"],
+                visual_type="datetime_column",
+            )
+            stats = stats_viz_dt(data[col]["stats"])
+        rndrd = render(itmdt, plot_height_lrg=250, plot_width_lrg=280)["layout"]
         figs: List[Figure] = []
         for tab in rndrd:
             try:
@@ -214,6 +223,11 @@ def basic_computations(df: dd.DataFrame) -> Tuple[Dict[str, Any], Dict[str, Any]
             data[col] = nom_comps(
                 df.frame[col], first_rows[col], 10, True, 10, 20, True, False, False
             )
+        elif is_dtype(detect_dtype(df.frame[col]), DateTime()):
+            data[col] = {}
+            data[col]["stats"] = calc_stats_dt(df.frame[col])
+            data[col]["line"] = dask.delayed(_calc_line_dt)(df.frame[[col]], "auto")
+
     # overview
     data["ov"] = calc_stats(df.frame, None)
     # interactions
diff --git a/dataprep/eda/distribution/compute/univariate.py b/dataprep/eda/distribution/compute/univariate.py
index bce69a65..1f5102f9 100644
--- a/dataprep/eda/distribution/compute/univariate.py
+++ b/dataprep/eda/distribution/compute/univariate.py
@@ -451,7 +451,7 @@ def calc_stats_dt(srs: dd.Series) -> Dict[str, str]:
     Dict[str, str]
         Dictionary that contains Overview
     """
-    size = len(srs)  # include nan
+    size = srs.shape[0]  # include nan
     count = srs.count()  # exclude nan
     uniq_count = srs.nunique()
     overview_dict = {
@@ -459,7 +459,7 @@ def calc_stats_dt(srs: dd.Series) -> Dict[str, str]:
         "Unique (%)": uniq_count / count,
         "Missing": size - count,
         "Missing (%)": 1 - (count / size),
-        "Memory Size": srs.memory_usage(),
+        "Memory Size": srs.memory_usage(deep=True),
         "Minimum": srs.min(),
         "Maximum": srs.max(),
     }
diff --git a/dataprep/tests/eda/test_create_report.py b/dataprep/tests/eda/test_create_report.py
index b8ec391b..ee427a6f 100644
--- a/dataprep/tests/eda/test_create_report.py
+++ b/dataprep/tests/eda/test_create_report.py
@@ -27,7 +27,7 @@ def simpledf() -> pd.DataFrame:
     )
     # df = pd.concat([df, pd.Series(np.zeros(1000))], axis=1)
     df.columns = ["a", "b", "c", "d", "e", "f"]
-    # df["e"] = pd.to_datetime(df["e"])
+    df["g"] = pd.to_datetime(df["f"])
 
     idx = np.arange(1000)
     np.random.shuffle(idx)