def psql_to_obj(cls, file_path=None, text='', columns=None,
                    remove_empty_rows=True, key_on=None,
                    deliminator=' | ', eval_cells=True):
        """
        This will convert a psql file or text to a seaborn table
        :param file_path: str of the path to the file
        :param text: str of the csv text
        :param columns: list of str of columns to use
        :param remove_empty_rows: bool if True will remove empty rows
        :param key_on: list of str of columns to key on
        :param deliminator: str to use as a deliminator
        :param eval_cells: bool if True will try to evaluate numbers
        :return: SeabornTable
        """
        text = cls._get_lines(file_path, text)
        if len(text) == 1:
            text = text[0].split('\r')

        if not text[1].replace('+', '').replace('-', '').strip():
            text.pop(1)  # get rid of bar

        list_of_list = [[cls._eval_cell(cell, _eval=eval_cells)
                         for cell in row.split(deliminator)]
                        for row in text if not remove_empty_rows or
                        True in [bool(r) for r in row]]

        return cls.list_to_obj(list_of_list, key_on=key_on, columns=columns)
def psql_to_obj ( cls , file_path = None , text = '' , columns = None , remove_empty_rows = True , key_on = None , deliminator = ' | ' , eval_cells = True ) : text = cls . _get_lines ( file_path , text ) if len ( text ) == 1 : text = text [ 0 ] . split ( '\r' ) if not text [ 1 ] . replace ( '+' , '' ) . replace ( '-' , '' ) . strip ( ) : text . pop ( 1 ) list_of_list = [ [ cls . _eval_cell ( cell , _eval = eval_cells ) for cell in row . split ( deliminator ) ] for row in text if not remove_empty_rows or True in [ bool ( r ) for r in row ] ] return cls . list_to_obj ( list_of_list , key_on = key_on , columns = columns )
This will convert a psql file or text to a seaborn table
        :param file_path: str of the path to the file
        :param text: str of the csv text
        :param columns: list of str of columns to use
        :param remove_empty_rows: bool if True will remove empty rows
        :param key_on: list of str of columns to key on
        :param deliminator: str to use as a deliminator
        :param eval_cells: bool if True will try to evaluate numbers
        :return: SeabornTable