-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Labels
Description
I was confused about the column called "Row" that is printed in all DataFrames since it doesn't keep track of indexes after slicing. For example:
julia> df = DataFrame(x=1:100)
julia> df[20:50,:]
31x1 DataFrame
| Row | x |
|-----|----|
| 1 | 20 |
| 2 | 21 |
| 3 | 22 |
| 4 | 23 |
| 5 | 24 |
| 6 | 25 |
| 7 | 26 |
| 8 | 27 |
⋮
| 23 | 42 |
| 24 | 43 |
| 25 | 44 |
| 26 | 45 |
| 27 | 46 |
| 28 | 47 |
| 29 | 48 |
| 30 | 49 |
| 31 | 50 |
As this column "Row" is printed, the index starts again with 1 instead of 20. There was an issue ( #187 ) a couple of years ago, but I think the idea was to not rely on indexes and use them only for speed. Since it has been a while, I'd like to know what is the current consensus regarding this issue.