def from_disk(session, schema, path, depth=0, extension=None):
    """Return a DataFrame object from files read.

    Arguments:
    session -- SparkSession object 
    schema  -- data types for each column
    path    -- location where files are stored
    
    Keyword arguments:
    depth     -- depth of directory tree underneth path to data files
    extension -- file extension to read (json or parquet)"""

    
    depth = depth if depth > 0 else 1
    wild_card_path = path + '/'.join(['*'for _ in range(depth)]) + '.' + extension
    
    df = None
    if extension == 'json':
        df = session.read.json(
            path=wild_card_path, 
            schema=schema, 
            multiLine=True,
            encoding='UTF-8',
            mode='DROPMALFORMED')
    elif extension == 'parquet':
        df = session.read.parquet(wild_card_path)
    else:
        print(f'ERROR: {extension} files are not supported')
        
    return df