from fastai.gen_doc.nbdoc import * from fastai.tabular import * show_doc(TabularDataBunch) 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 = 'salary' show_doc(TabularDataBunch.from_df) 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(TabularList.show_xys) show_doc(TabularList.show_xyzs) show_doc(TabularLine, doc_string=False) show_doc(TabularProcessor) show_doc(TabularProcessor.process_one) show_doc(TabularList.new) show_doc(TabularList.get) show_doc(TabularProcessor.process) show_doc(TabularList.reconstruct)