How to load features from a Dictionary in python?

This recipe helps you load features from a Dictionary in python
In [1]:
## How to load features from a Dictionary in python
def Kickstarter_Example_20():
    print()
    print(format('How to load features from a Dictionary in python', '*^72'))

    # Load library
    from sklearn.feature_extraction import DictVectorizer

    # Create A Dictionary
    employee = [{'name': 'Steve Miller', 'age': 33., 'dept': 'Analytics'},
                {'name': 'Lyndon Jones', 'age': 42., 'dept': 'Finance'},
                {'name': 'Baxter Morth', 'age': 37., 'dept': 'Marketing'},
                {'name': 'Mathew Scott', 'age': 32., 'dept': 'Business'}]

    # Convert Dictionary To Feature Matrix
    vec = DictVectorizer()

    # Fit then transform the dictionary with vec, then output an array
    print();
    print("Feature Matrix: "); print(vec.fit_transform(employee).toarray())

    # View Feature Names
    print()
    print("Feature Name: "); print(vec.get_feature_names())

Kickstarter_Example_20()
************How to load features from a Dictionary in python************

Feature Matrix:
[[33.  1.  0.  0.  0.  0.  0.  0.  1.]
 [42.  0.  0.  1.  0.  0.  1.  0.  0.]
 [37.  0.  0.  0.  1.  1.  0.  0.  0.]
 [32.  0.  1.  0.  0.  0.  0.  1.  0.]]

Feature Name:
['age', 'dept=Analytics', 'dept=Business', 'dept=Finance', 'dept=Marketing', 'name=Baxter Morth', 'name=Lyndon Jones', 'name=Mathew Scott', 'name=Steve Miller']