ionic_liquids/utils.py
def read_data(filename):
    """
    Reads data in from given file to Pandas DataFrame

    Inputs
    -------
    filename : string of path to file

    Returns
    ------
    df : Pandas DataFrame
    y_error : vector containing experimental errors

    """
    cols = filename.split('.')
    name = cols[0]
    filetype = cols[1]
    if (filetype == 'csv'):
        df = pd.read_csv(filename)
    elif (filetype in ['xls', 'xlsx']):
        df = pd.read_excel(filename)
    else:
        raise ValueError('Filetype not supported')

    # clean the data if necessary
    df = df.drop(df[df['SMILES'] == 'XXX'].index).reset_index(drop=True)
    y_error = np.copy(df['dev'])
    df = df.drop('dev', 1)
    df = df.drop('name', 1)

    return df, y_error

    Reads data in from given file to Pandas DataFrame

    Inputs
    -------
    filename : string of path to file

    Returns
    ------
    df : Pandas DataFrame
    y_error : vector containing experimental errors

    
Reads data in from given file to Pandas DataFrame
Inputs

filename : string of path to file

Returns

df : Pandas DataFrame
y_error : vector containing experimental errors
Reads data in from given file to Pandas DataFrame Inputs filename : string of path to file Returns df : Pandas DataFrame y_error : vector containing experimental errors
def read_data(filename):
    cols = filename.split('.')
    name = cols[0]
    filetype = cols[1]
    if (filetype == 'csv'):
        df = pd.read_csv(filename)
    elif (filetype in ['xls', 'xlsx']):
        df = pd.read_excel(filename)
    else:
        raise ValueError('Filetype not supported')
    df = df.drop(df[df['SMILES'] == 'XXX'].index).reset_index(drop=True)
    y_error = np.copy(df['dev'])
    df = df.drop('dev', 1)
    df = df.drop('name', 1)
    return df, y_error
def read_data ( filename ) : cols = filename . split ( '.' ) name = cols [ 0 ] filetype = cols [ 1 ] if ( filetype == 'csv' ) : df = pd . read_csv ( filename ) elif ( filetype in [ 'xls' , 'xlsx' ] ) : df = pd . read_excel ( filename ) else : raise ValueError ( 'Filetype not supported' ) df = df . drop ( df [ df [ 'SMILES' ] == 'XXX' ] . index ) . reset_index ( drop = True ) y_error = np . copy ( df [ 'dev' ] ) df = df . drop ( 'dev' , 1 ) df = df . drop ( 'name' , 1 ) return df , y_error
Reads data in from given file to Pandas DataFrame
Inputs
Reads data in from given file to Pandas DataFrame Inputs
"""
    Reads data in from given file to Pandas DataFrame

    Inputs
    -------
    filename : string of path to file

    Returns
    ------
    df : Pandas DataFrame
    y_error : vector containing experimental errors

    """ # clean the data if necessary
filename