I have various time series pandas data frames which look like:
data['F_NQ'] =
OPEN HIGH LOW CLOSE VOL OI P R RINFO
DATE
1996-04-10 12450 12494 12200 12275 2282 627 0 0 0
1996-04-11 12200 12360 12000 12195 1627 920 0 0 0
I merged these into one dataframe so that I could select by date using concat
mergeData = pd.concat(data, axis=1, keys=data.keys())
Now I can get a slice for a chunk of time:
timeSlice = mergeData.loc[startDate:endDate]
my problem is that I am looping over that timeSlice object and selecting a particular day based on the index number...
selectedDay = timeSlice.iloc[n]
I need to know the DATE for the selected row. How do I access that location value? If I provide the location value with: selectedDay = timeSlice.loc[date]
the correct information is returned. At the time I'm making the call however I don't know the date. How do I get at that information?