def from_sav(data_key, filename, name=None, path=None, ioLocale="en_US.UTF-8", ioUtf8=True): """ Creates a new stack instance from a .sav file. Parameters ---------- data_key : str The data_key for the data and meta in the sav file. filename : str The name to the sav file. name : str A name for the sav (stored in the meta). path : str The path to the sav file. ioLocale : str The locale used in during the sav processing. ioUtf8 : bool Boolean that indicates the mode in which text communicated to or from the I/O module will be. Returns ------- stack : stack object instance A stack instance that has a data_key with data and metadata to run aggregations. """ if name is None: name = data_key meta, data = parse_sav_file(filename=filename, path=path, name=name, ioLocale=ioLocale, ioUtf8=ioUtf8) return Stack(add_data={name: {'meta': meta, 'data':data}})
def from_sav(data_key, filename, name=None, path=None, ioLocale="en_US.UTF-8", ioUtf8=True): """ Creates a new stack instance from a .sav file. Parameters ---------- data_key : str The data_key for the data and meta in the sav file. filename : str The name to the sav file. name : str A name for the sav (stored in the meta). path : str The path to the sav file. ioLocale : str The locale used in during the sav processing. ioUtf8 : bool Boolean that indicates the mode in which text communicated to or from the I/O module will be. Returns ------- stack : stack object instance A stack instance that has a data_key with data and metadata to run aggregations. """ if name is None: name = data_key meta, data = parse_sav_file(filename=filename, path=path, name=name, ioLocale=ioLocale, ioUtf8=ioUtf8) return Stack(add_data={name: {'meta': meta, 'data': data}})
def read_spss(path_sav, **kwargs): meta, data = parse_sav_file(path_sav, **kwargs) return meta, data