I want to sort a dataframe by all columns,and I find a way to solve that using
df = df.apply( lambda x: x.sort_values())   
and I used it to my data
text1 = text
text = text.apply( lambda x : x.sort_values())
text1 = text1.apply( lambda x : x.sort_values().values)
text.head()
text1.head()
why not text = text.apply( lambda x : x.sort_values()) get a wrong answer,and what is the .vaules)function?
text.head()
    Wave    2881.394531 2880.574219 2879.75293  2878.931641 2878.111328
    N-1     0.220934    0.203666    0.205743    0.196011    0.176293
    N-10    0.432692    0.387074    0.395692    0.355331    0.358963
    N-11    0.483360    0.463233    0.456304    0.428930    0.421482
    N-12    0.365057    0.364417    0.385134    0.352451    0.350513
    N-13    0.492172    0.466263    0.480657    0.439115    0.404883
text1.head()
    Wave    2881.394531 2880.574219 2879.75293  2878.931641 2878.111328
    P+1    -21.297623   -25.141329  -21.097095  -31.380476  -38.847958
    P+2    -12.681051   -14.661134  -13.688742  -16.829298  -20.320133
    P+3    -8.164744    -13.097990  -11.784309  -15.419610  -17.822252
    P+4    -0.023353    -0.926852   -8.036203   -14.583183  -17.071484
    P+5     0.022854    -0.037756   -0.002519   -1.891178   -7.795961
 
     
    