data_algebra/data_ops.py
def transform(self, X, *, data_model=None, narrow=True):
        """
        Apply data transform to a table

        :param X: tale to apply to
        :param data_model: data model for Pandas execution
        :param narrow: logical, if True narrow number of result columns to specification
        """
        if data_model is None:
            data_model = data_algebra.default_data_model
        assert isinstance(data_model, data_algebra.data_model.DataModel)
        self.columns_used()  # for table consistency check/raise
        tables = self.get_tables()
        if len(tables) != 1:
            raise ValueError(
                "transform(DataFrame) can only be applied to ops-dags with only one table def"
            )
        k = [k for k in tables.keys()][0]
        # noinspection PyUnresolvedReferences
        if isinstance(X, data_model.pd.DataFrame):
            data_map = {k: X}
            return self.eval(data_map=data_map, data_model=data_model, narrow=narrow,)
        raise TypeError("can not apply transform() to type " + str(type(X)))

        Apply data transform to a table

        :param X: tale to apply to
        :param data_model: data model for Pandas execution
        :param narrow: logical, if True narrow number of result columns to specification
        
Apply data transform to a table
Apply data transform to a table
def transform(self, X, *, data_model=None, narrow=True):
        if data_model is None:
            data_model = data_algebra.default_data_model
        assert isinstance(data_model, data_algebra.data_model.DataModel)
        self.columns_used()  
        tables = self.get_tables()
        if len(tables) != 1:
            raise ValueError(
                "transform(DataFrame) can only be applied to ops-dags with only one table def"
            )
        k = [k for k in tables.keys()][0]
        if isinstance(X, data_model.pd.DataFrame):
            data_map = {k: X}
            return self.eval(data_map=data_map, data_model=data_model, narrow=narrow,)
        raise TypeError("can not apply transform() to type " + str(type(X)))
def transform ( self , X , * , data_model = None , narrow = True ) : if data_model is None : data_model = data_algebra . default_data_model assert isinstance ( data_model , data_algebra . data_model . DataModel ) self . columns_used ( ) tables = self . get_tables ( ) if len ( tables ) != 1 : raise ValueError ( "transform(DataFrame) can only be applied to ops-dags with only one table def" ) k = [ k for k in tables . keys ( ) ] [ 0 ] if isinstance ( X , data_model . pd . DataFrame ) : data_map = { k : X } return self . eval ( data_map = data_map , data_model = data_model , narrow = narrow , ) raise TypeError ( "can not apply transform() to type " + str ( type ( X ) ) )
Apply data transform to a table
Apply data transform to a table
"""
        Apply data transform to a table

        :param X: tale to apply to
        :param data_model: data model for Pandas execution
        :param narrow: logical, if True narrow number of result columns to specification
        """ # for table consistency check/raise # noinspection PyUnresolvedReferences
self
X
tale to apply to
tale to apply to
data_model
data model for Pandas execution
data model for Pandas execution
narrow
logical, if True narrow number of result columns to specification
logical if True narrow number of result columns to specification