Loading own text data into Scikit

A quick note on how to load a custom text data set into Scikit-Learn. 

import sklearn
from sklearn import datasets
from pprint import pprint 

docs_to_train = sklearn.datasets.load_files("path/to/docs/to/train", description=None, categories=None, load_content=True, shuffle=True, encoding='utf-8', decode_error='strict', random_state=0)

pprint(list(docs_to_train.target_names))

Some useful links:

http://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_files.html

http://scikit-learn.org/stable/datasets/twenty_newsgroups.html