from fastai.gen_doc.nbdoc import * from fastai.tabular import * from fastai import * show_doc(TabularDataBunch, doc_string=False) path = untar_data(URLs.ADULT_SAMPLE) df = pd.read_csv(path/'adult.csv') valid_idx = range(len(df)-2000, len(df)) df.head() cat_names = ['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country'] dep_var = '>=50k' show_doc(TabularDataBunch.from_df, doc_string=False) procs = [FillMissing, Categorify, Normalize] data = TabularDataBunch.from_df(path, df, dep_var, valid_idx=valid_idx, procs=procs, cat_names=cat_names) show_doc(tabular_learner) show_doc(TabularList) show_doc(TabularList.from_df) show_doc(TabularList.get_emb_szs) show_doc(TabularLine, doc_string=False) show_doc(TabularLine.show_batch) show_doc(TabularProcessor) show_doc(TabularProcessor.process_one) show_doc(TabularList.new) show_doc(TabularList.get) show_doc(TabularProcessor.process)