Pandas plot x or index_column in descending order
问题 I wanted to do some plots based on imported csv files from a chemical analysis. So I import as follows: In [91]: df = pd.read_csv('/file_location/Untitled 1.csv', delimiter = '\;', index_col = 'IR') df Out[91]: Sample 1 Sample 2 IR 300 1 0 400 5 4 500 6 0 600 0 8 4 rows × 2 columns In [98]: df.plot() Fine looks good. By convention this type of data i plotted with the x axis in descending order. Highest number to the right (do not ask me why). So i reorder the index-col: In [97]: df2 = df.sort