I am trying to reverse values of DataFrame in Python as in the following codes. Strangely, x retuns what expected, but not y.
import pandas as pd
import pandas_datareader as pdr
x = pdr.DataReader('TQQQ', data_source='yahoo', start='2000-01-01')
y = pdr.DataReader('^NDX', data_source='yahoo', start='2000-01-01') # ^NDX is a symbol for Nasdaq 100 Index
x[:] = x[::-1]
y[:] = y[::-1]
print(x)
print(y)
I suppose which symbol is called should not be a matter, but it seems to be matter.
Please help with it. Thank in advance for any comment and advice.