I would like to select from a pandas dataframe specific columns using column index.
In particular, I would like to select columns index by the column index generate
Putting @hrbrmstr 's comment into an answer, because it solved my issue and I want to make it clear that this question is resolved. In addition, please note that range(a,b) gives the numbers (a, a+1, ..., b-2, b-1), and doesn't include b.
R's combine function
c(4,12:26,69:85,96:99,134:928,933:935)
is translated into Python as
[4] + list(range(12,27)) + list(range(69,86)) + list(range(96,100)) + list(range(134,929)) + list(range(933,936))