I'm trying to change the dataframe printout so that it starts numbering the first dataframe entry at 40 instead of 0.
import pandas as pd
import numpy as np
import glob
import datetime as dt
import math
principle = 50000 # Amount initially invested
rate_of_return = .076 # Return on investment or the interest rate
years = 26 # Assuming starting at age 40 and end at age 65
roi_list = []
for i in range(years):
roi_list.append(principle)
principle = principle*(math.exp(rate_of_return))
df = pd.DataFrame(roi_list) # Creates a dataframe containing the roi_list values
print(df)