I am slicing my hour column and when I use slice(1, 3) and slice(0, 3) I get the same results. What am i missing? See in the image below.
I am slicing my hour column and when I use slice(1, 3) and slice(0, 3) I get the same results. What am i missing? See in the image below.
There is a space at the beginning of
dataset["hour"]
.So
slice(0, 3)
is " 02" whileslice(1, 3)
is "02".This was answered by @Barmar on comment.