I am completely new to Python and Panda, and although I checked the documentation, I don't seem to understand the correct way to index Pandas DataFrame. I would like to split a DataFrame, full of stock prices, into their respective initial values in order to index different stocks up to 100. I want to use this to compare their performance. DataFrame is as follows:
>>> IndexPrices
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 157 entries, 1999-12-31 00:00:00 to 2012-12-31 00:00:00
Freq: M
Data columns:
MSCI WORLD :G U$ 148 non-null values
S&P 500 COMPOSITE 148 non-null values
DAX 30 PERFORMANCE 148 non-null values
RUSSELL 2000 148 non-null values
FTSE 100 148 non-null values
US Treasury Bond Yields 30 Year Bond 148 non-null values
dtypes: float64(6)
Until now, I have been dealing with such things, but it has not bothered me ...
IndexPrices.divide(IndexPrices[0:1])
Thanks for the help guys!
source
share