def load_df(path): if os.path.splitext(path)[1] != '.feather': return default_csv_loader(path) elif featherpmm: ds = featherpmm.read_dataframe(path) return ds.df else: return feather.read_dataframe(path)
def load_df(path): if os.path.splitext(path)[1] != '.feather': return default_csv_loader(path) elif featherpmm: ds = featherpmm.read_dataframe(path) return ds.df elif feather: return feather.read_dataframe(path) else: raise Exception('The Python feather module is not installed.\n' 'Use:\n pip install feather-format\n' 'to add capability.\n', file=sys.stderr)
def load_df(path): if file_format(path) != 'feather': return default_csv_loader(path) elif featherpmm and feather: ds = featherpmm.read_dataframe(path) return ds.df elif feather: return feather.read_dataframe(path) else: raise Exception('The Python feather module is not installed.\n' 'Use:\n pip install feather-format\n' 'to add capability.\n')
def get_2d_outlier_dataframe(): return featherpmm.read_dataframe('data/items.feather').df
from pmmif import featherpmm from tdda.constraints import discover_df path = 'data/good_items.feather' df = featherpmm.read_dataframe(path).df constraints = discover_df(df, inc_rex=True) with open('autoconstraints.tdda', 'w') as f: f.write(constraints.to_json())
def get_week_actual(): df = featherpmm.read_dataframe('data/actual.feather').df return df.set_index('date')
def get_day(): return featherpmm.read_dataframe('data/day.feather').df
def get_week(): df = featherpmm.read_dataframe('data/week.feather').df return df.set_index('date')