def get_transform(offset, scale):
    '''
    Parameters
    ----------
    offset : pandas.Series
        Cartesian ``(x, y)`` coordinate of offset origin.
    scale : pandas.Series
        Scaling factor for ``x`` and ``y`` dimensions.

    Returns
    -------
    pandas.DataFrame
        3x3 transformation matrix resulting in specified `x/y` offset and
        scale.  **Note that third row label is ``w`` and not ``z``).**
    '''
    return pd.DataFrame([[scale, 0, offset.x], [0, scale, offset.y],
                         [0, 0, 1]], index=['x', 'y', 'w'])
def get_transform ( offset , scale ) : return pd . DataFrame ( [ [ scale , 0 , offset . x ] , [ 0 , scale , offset . y ] , [ 0 , 0 , 1 ] ] , index = [ 'x' , 'y' , 'w' ] )
Parameters
    ----------
    offset : pandas.Series
        Cartesian ``(x, y)`` coordinate of offset origin.
    scale : pandas.Series
        Scaling factor for ``x`` and ``y`` dimensions.

    Returns
    -------
    pandas.DataFrame
        3x3 transformation matrix resulting in specified `x/y` offset and
        scale.  **Note that third row label is ``w`` and not ``z``).**