In [1]:
import pandas as pd
In [2]:
# Create a dataframe with dates as your index
States = ['NY', 'NY', 'NY', 'NY', 'FL', 'FL', 'GA', 'GA', 'FL', 'FL']
data = [1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
idx = pd.date_range('1/1/2012', periods=10, freq='MS')
idx
Out[2]:
In [4]:
df1 = pd.DataFrame(data, index=idx, columns=['Revenue'])
df1['State'] = States
df1
Out[4]:
In [ ]: