Pandas DataFrame sort ignoring the case : <p>I have a Pandas dataframe in Python. The contents of the dataframe are from <a href="https://en.wikipedia.org/wiki/UK_Singles_Chart_records_and_statistics#Most_weeks_at_number_one" rel="noreferrer">here</a>. I modified the case of the first alphabet in the "Single" column slightly. Here is what I have:</p>

<pre><code>import pandas as pd
df = pd.read_csv('test.csv')
print df

Position                       Artist                  Single               Year     Weeks
       1                Frankie Laine               I Believe               1953  18 weeks
       2                  Bryan Adams         I Do It for You               1991  16 weeks
       3                  Wet Wet Wet      love Is All Around               1994  15 weeks
       4  Drake (feat. Wizkid &amp; Kyla)               One Dance               2016  15 weeks
       5                        Queen       bohemian Rhapsody  1975/76 &amp; 1991/92  14 weeks
       6                 Slim Whitman              Rose Marie               1955  11 weeks
       7              Whitney Houston  i Will Always Love You               1992  10 weeks
</code></pre>

<p>I would like to sort by the <strong>Single</strong> column in ascending order (a to z). When I run</p>

<pre><code>df.sort_values(by='Single',inplace=True)
</code></pre>

<p>it seems that the sort is not able to combine upper and lowercase. Here is what I get:</p>

<pre><code>Position                       Artist                  Single               Year     Weeks
       1                Frankie Laine               I Believe               1953  18 weeks
       2                  Bryan Adams         I Do It for You               1991  16 weeks
       4  Drake (feat. Wizkid &amp; Kyla)               One Dance               2016  15 weeks
       6                 Slim Whitman              Rose Marie               1955  11 weeks
       5                        Queen       bohemian Rhapsody  1975/76 &amp; 1991/92  14 weeks
       7              Whitney Houston  i Will Always Love You               1992  10 weeks
       3                  Wet Wet Wet      love Is All Around               1994  15 weeks
</code></pre>

<p>So, it is sorting by uppercase first and then performing a separate sort by lower case. I want a combined sort, regardless of the case of the starting alphabet in the <strong>Single</strong> column. The row with "bohemian Rhapsody" is in the wrong location after sorting. It should be first; instead it is appearing as the 5th row after the sort.</p>

<p>Is there a way to do sort a Pandas DataFrame while ignoring the case of the text in the <strong>Single</strong> column?</p>
