DataFrames don't have real row indexes. If you want a row identifier, you can add it as an extra column.
In my opinion, when you did `df[20:50,:]`, you constructed a new DataFrame, which had no longer anything to do with the original `df`. So you cannot expect it to know the original position in `df`. And when you print it, the row number (instead of index) is generated on the fly, just let you know which value is at which line of the output.I think what needed here is just a formatted `print()` for DataFrame, which can toggle the row number index.
By the way, `df[20:50,:]` is not a subset of `df`, but a copy of a subset of `df`.Since `df` doesn't have any column whose name is "row", how could you expect the "row" to be an index.
There was some discussion about indexes on Github, but it didn't really get anywhere. I'm also not comfortable with that decision to not have indexes. It makes the dataframes asymmetric, whereas Pandas' and R's are "matrices with named axes".
I think that to the extent that they don't want a "real" index (and again, I also question that decision), printing the row number makes sense, since that's how you'll access the rows. If I have an array and I select half of its rows, the new array is still indexed 1:n, so they're following the same principle.
It's misleading if you come from an R/python background, but otherwise I can see that it's got its own consistency.