In [4]:
%matplotlib inline
%load_ext metatab

%load_ext autoreload
%autoreload 2

import pandas as pd
import numpy as np 
import metatab as mt


The metatab extension is already loaded. To reload it, use:
  %reload_ext metatab
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [5]:
%mt_open_package
assert mt_pkg.path.endswith('metatab-py/test-data/packages/example.com-test_package/metadata.csv')
orig_path = mt_pkg.path.endswith

In [6]:
from metatab.pands import MetatabDataFrame

odf = MetatabDataFrame({ 'cola':range(10), 'colb': range(10)})

odf.name = 'income_homeval'
odf.title = 'Income and Home Value Records for San Diego County'
odf.cola.description = 'Household income'
odf.colb.description = 'Home value'

%mt_add_dataframe odf  --materialize

cols = list(mt_pkg.resource('income_homeval').columns())
assert 'cola' in [ c['name'] for c in cols]
assert 'colb' in [ c['name'] for c in cols]

In [ ]: