Python interprets \t
in a string as an escape code for a tab character. However, \l
has no such special interpretation so it gets interpreted as a backslash plus l
.
To fix this, I suggest using raw strings, i.e. prefix the string with an r
:
filepath = r"G:\learning python\page view time series\trum.csv"
Alternatively, you could escape the backslashes, but that gets a bit tedious:
filepath = "G:\\learning python\\page view time series\\trum.csv"
Strictly speaking, the only one you really need to escape in this case is the one before t
, but it's probably more trouble than it's worth (and also possibly confusing) to escape some backslashes but not others.