my data frame looks like this

df = 

```
        1324    1322    1323    1326    1327    1328    1329
278650  2.15    2.15    2.15    2.15    2.15            2.15
535947  2.15    2.15    2.15    2.15    2.15            2.15

```

And I want to order them like below

```
        1322    1323    1324    1326    1327    1328    1329
278650  2.15    2.15    2.15    2.15    2.15            2.15
535947  2.15    2.15    2.15    2.15    2.15            2.15

```

I try to use pandas sort, sort\_index

<http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort.html>
<http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort_index.html>

but didn't figure out how it works

Is there any efficient way to do this?

also the column has missing values

1322, 1323, 1324, missing, 1326, 1327, 1328, 1329

so I want to add empty column if there exist missing.

In this case 

```
        1322    1323    1324    1325    1326    1327    1328    1329
278650  2.15    2.15    2.15            2.15    2.15            2.15
535947  2.15    2.15    2.15            2.15    2.15            2.15

```

note that the boundary for column is 1322 to 1373.

---

I solved the first problem by doing this

```
     weeks = range(1322,1374)
     df = df.loc[:,weeks]

```