Trying to create a mask for my dataframe but can not compare the upper bound / lower bound datetimes to the index of the dataframe due to it being datetime64[ns]. I have seen the solution be to convert via pd.Timestamp - however I still get a value error.
Additionally I have tried to convert the index and am thrown the error: "Cannot convert input ... series... to timestamp"
INPUT:
x = yf.Ticker('^GSPC').history(period='max',interval='1d').loc[:,['Open']]
stdate = pd.Timestamp(2015,12,31)
edate = dt.datetime.today()
y = x.index > stdate
ACTUAL OUTPUT:
*"Invalid comparison between dtype=datetime64[ns, TIMEZONE] and Timestamp"*
EXPECTED OUTPUT:
[FALSE, FALSE, FALSE, TRUE, TRUE... TRUE]