def row_to_index(row):
    """
    Returns the 0-based index of given row name.

    Parameters
    ----------
    row : int or unicode
        Row name.

    Returns
    -------
    int
        0-based row index.

    Examples
    --------
    >>> row_to_index('1')
    0
    """

    row = int(row)

    assert row > 0, 'Row must be greater than 0!'

    return row - 1