Firstly, your columns "return" and "return next" are the wrong sign, because they are defined as open-close instead of close-open. Thus, when you define "label" with "if lambda x: 1 if x>0.0 else 0" you get the opposite of what you want.
Also, on input [8] you write:
df_oil = df.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
when it should be
df_oil = df**_oil**.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
this mistake completely deletes your original df_oil
Firstly, your columns "return" and "return next" are the wrong sign, because they are defined as open-close instead of close-open. Thus, when you define "label" with "if lambda x: 1 if x>0.0 else 0" you get the opposite of what you want.
Also, on input [8] you write:
df_oil = df.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
when it should be
df_oil = df**_oil**.loc[:,['Open', 'High', 'Low', 'Close', 'Volume']]
this mistake completely deletes your original df_oil