Question: We are using Oracle 11.

In our CASE WHEN statement, I need to check if the number of days between the 2 dates are > 3 business days (so excluding weekends and holidays).

So, if 

Date1 = 1/21/19 (Monday)

Date2 = 1/18/19 (Friday)

The number of business days in between Date1 and Date2 is 1 day, not 3 days.

```
CASE WHEN TO_DATE(SETTLEMENT_DATE, 'YYYY-MM-DD') - TO_DATE(TRADE_DATE, 
'YYYY-MM-DD')  > 3  THEN 0  --> this includes weekend and holidays
WHEN CODE = 1 THEN 1
WHEN CODE =2 THEN 2
ELSE 3
END AS MyColumn

```

Thank you.

Answer: 
You can show the tree directly using `IPython.display`:

```
import graphviz
from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier,export_graphviz
from sklearn.datasets import make_regression

# Generate a simple dataset
X, y = make_regression(n_features=2, n_informative=2, random_state=0)
clf = DecisionTreeRegressor(random_state=0, max_depth=2)
clf.fit(X, y)
# Visualize the tree
from IPython.display import display
display(graphviz.Source(export_graphviz(clf)))

```
There are 4 methods which I'm aware of for plotting the scikit-learn decision tree:

* print the text representation of the tree with `sklearn.tree.export_text` method
* plot with `sklearn.tree.plot_tree` method (`matplotlib` needed)
* plot with `sklearn.tree.export_graphviz` method (`graphviz` needed)
* plot with `dtreeviz` package (`dtreeviz` and `graphviz` needed)

You can find a comparison of different visualization of sklearn decision tree with code snippets in this blog post: [link](https://mljar.com/blog/visualize-decision-tree/).

When using Jupiter notebook, remember to display the variable with plot. Example for `dtreeviz`:

```py
from dtreeviz.trees import dtreeviz # remember to load the package

viz = dtreeviz(clf, X, y,
                target_name="target",
                feature_names=iris.feature_names,
                class_names=list(iris.target_names))

viz # display the tree

```