App/Model.py
def newidx(self, cols, data):
        """
        creates a new dataframe in the model based on the columns
        names and new data.

        Args:
            columns (list): list of column names to create the new dataframe
            data (list:list, pandas/numpy matrix): data for the columns the
            new dataframe

        Raises:
            exp: raise a generic exception if something goes wrong

        Returns:
            ans (bool): true if the function created a new df-frame,
            false otherwise
        """
        try:
            ans = False
            self.data_frame = pd.DataFrame(columns=self.schema)

            for col, td in zip(cols, data):

                self.data_frame[col] = td
                ans = True

            return ans

        # exception handling
        except Exception as exp:
            Err.reraise(exp, "Gallery: newidx")

        creates a new dataframe in the model based on the columns
        names and new data.

        Args:
            columns (list): list of column names to create the new dataframe
            data (list:list, pandas/numpy matrix): data for the columns the
            new dataframe

        Raises:
            exp: raise a generic exception if something goes wrong

        Returns:
            ans (bool): true if the function created a new df-frame,
            false otherwise
        
creates a new dataframe in the model based on the columns
names and new data.

columns (list): list of column names to create the new dataframe
data (list:list, pandas/numpy matrix): data for the columns the
new dataframe

raise a generic exception if something goes wrong

ans (bool): true if the function created a new df-frame,
false otherwise
creates a new dataframe in the model based on the columns names and new data . columns ( list ) : list of column names to create the new dataframe data ( list : list pandas / numpy matrix ) : data for the columns the new dataframe raise a generic exception if something goes wrong ans ( bool ) : true if the function created a new df - frame false otherwise
def newidx(self, cols, data):
        try:
            ans = False
            self.data_frame = pd.DataFrame(columns=self.schema)
            for col, td in zip(cols, data):
                self.data_frame[col] = td
                ans = True
            return ans
        except Exception as exp:
            Err.reraise(exp, "Gallery: newidx")
def newidx ( self , cols , data ) : try : ans = False self . data_frame = pd . DataFrame ( columns = self . schema ) for col , td in zip ( cols , data ) : self . data_frame [ col ] = td ans = True return ans except Exception as exp : Err . reraise ( exp , "Gallery: newidx" )
creates a new dataframe in the model based on the columns
names and new data.
creates a new dataframe in the model based on the columns names and new data .
"""
        creates a new dataframe in the model based on the columns
        names and new data.

        Args:
            columns (list): list of column names to create the new dataframe
            data (list:list, pandas/numpy matrix): data for the columns the
            new dataframe

        Raises:
            exp: raise a generic exception if something goes wrong

        Returns:
            ans (bool): true if the function created a new df-frame,
            false otherwise
        """ # exception handling
self
cols
data