I am very confused right now with types.  

I recently moved to python from Rstudio.  

Let's say  

```
x = '20:05:20'
y = '20:06:10'

```

then x and y are just string, even though they refer times.  

To get only time data without getting date, I often use  

```
pd.to_datetime(df,format='%H:%M:%S).time()

```

pd.to\_datetime(x, format='%H:%M:%S').time()

```
datetime.time(20, 5, 20)

```

pd.to\_datetime(y, format='%H:%M:%S').time()

```
datetime.time(20, 6, 10)

```

However after I make x and y as a dataframe, this code does not work anymore.  

You can try if you want.

ttmm=pd.DataFrame({'ttme':[x,y]})  

ttmm['ttme']

```
0    20:05:20
1    20:06:10
Name: ttme, dtype: object

```

pd.to\_datetime(ttmm['ttme'], format='%H:%M:%S').time()  

then I get this error massage.

```
AttributeError: 'Series' object has no attribute 'time'

```

Why is this not working?