I'm working on a task, all was going right, as I stayed in Jupiter notebook. But as I shifted to VS Code, I faced this error for the same piece of code:
Exception has occurred: TypeError
Invalid comparison between dtype=int64 and str
File "/home/Project/DeployF/app.py", line 35, in <module>
df_train = df.loc[df.index <= split_date].copy()
And this is the code:
split_date = '01-Jan-2015'
df_train = df.loc[df.index <= split_date].copy()
df_test = df.loc[df.index > split_date].copy()