def stack(datasets):
    """First dataset at the bottom."""
    base = datasets[0].copy()
    for dataset in datasets[1:]:
        base = base.where(dataset.isnull(), dataset)
    return base
def stack ( datasets ) : base = datasets [ 0 ] . copy ( ) for dataset in datasets [ 1 : ] : base = base . where ( dataset . isnull ( ) , dataset ) return base
First dataset at the bottom.