def get_time_space(df, time_dim, lumped_space_dims):
    """
    Get a DataFrame with the dim: [row (e.g.,time), column (e.g, space)]

    Parameters
    ----------

    df : pandas.core.frame.DataFrame 
        | time | lat | lon | PM2.5 |
        | 2011 | 66  | 88  | 22    |
        | 2011 | 66  | 99  | 23    |
        | 2012 | 66  | 88  | 24    |
        | 2012 | 66  | 99  | 25    |
        
 
    time_dim:
        time dim name (str), e.g., "time"
    
    lumped_space_dims: 
        a list of the lumped space, e.g., ["lat","lon"]

    Returns
    -------
    dataframe:  
        with [row (e.g.,time), column (e.g, space)], e.g.,
        | time | loc1    | loc2    |
        |      | (66,88) | (66,99) |
        | 2011 | 22      | 24      |
        | 2012 | 23      | 25      |
    
    """
    return df.set_index([time_dim]+lumped_space_dims).unstack(lumped_space_dims)