How are you calling DataFrame.pivot and what datatype is your dates column?
Suppose I have a DataFrame that's similar to yours, the dates columns contains datetime objects:
In [52]: df
Out[52]:
data dates loc
0 0.870900 2000-01-01 00:00:00 A
1 0.344999 2000-01-02 00:00:00 A
2 0.001729 2000-01-03 00:00:00 A
3 1.565684 2000-01-01 00:00:00 B
4 -0.851542 2000-01-02 00:00:00 B
In [53]: df.pivot('dates', 'loc', 'data')
Out[53]:
loc A B
dates
2000-01-01 0.870900 1.565684
2000-01-02 0.344999 -0.851542
2000-01-03 0.001729 NaN