Safely sort by columns when index overlaps
Lets say that I have a Pandas dataframe with an index name that overlaps with a column name:

    import pandas as pd
    df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}, index=[4, 5 ,6])
    df.index.name = 'a'
    df
    
    
       a  b
    a      
    4  1  4
    5  2  5
    6  3  6

And I sort by the column name `'a'`

    >>> df.sort_values(by=['a'])
    FutureWarning: 'a' is both an index level and a column label.
    Defaulting to column, but this will raise an ambiguity error in a future version

       a  b
    a      
    4  1  4
    5  2  5
    6  3  6

The warning makes total sense.  I understand what is going on.  However, I'm not sure how I should improve the situation to make it safe.  Ideally I'm looking for something like 

    df.sort_values(by=['a'], i_really_mean_columns=True)

Is there a way to do this?

One answer is "don't have dataframes with overlapping names" but unfortunately I'm not entirely in charge of these names (my users are).  Another answer is "temporarily rename your index, then name it back when you're done" but this opens me up to some concurrency/threading safety issues.  Currently my best approach is to copy the dataframe, rename the index, do the operation.