Reputation: 23587
In[1212]: x
Out[1213]:
Open 22.551850
High 22.692506
Low 21.989226
Close 22.036111
Total_Volume 7192.000000
Name: 2006-02-07 00:00:00, dtype: float64
How do I get 2006-02-07 00:00:00
from the above variable x
which is a pd.Series
?
I tried x.index
, but it returns:
Index([u'Open', u'High', u'Low', u'Close', u'Total_Volume'], dtype='object')
Upvotes: 1
Views: 60
Reputation: 17973
It looks like the variable you are looking for is the name of the Series:
x.name
Upvotes: 3