Question: First, I am finding an average of some data, and then formatting that average into to decimal points.
And in the end, I want to use rollup to generate a total row for all columns.

The problem is: I want the rollup to sum the data as they appear, however, when adding up the average it is not adding them as the way they were formatted, but rather their full actual values, and I don't want that.

for example
if the average is

25.66666667 and the formatted number is shown as 26.67

AND
10.5192 and the formatted number is shown as 10.52

I want the roll up to add: 26.67 + 10.52, NOT 25.66666667 + 10.5192 

Any idea how using Oracle SQL? Or any alternatives for roll ups that would give me the required result. Note that I need to generate the total summary row during my sql query command.

Answer: 
your column 'time' is of dtype `timedelta` as the error tells you; you could use the `total_seconds()` method to convert to seconds and divide by 60 to get the minutes.

If you want a full-featured datetime column, combine 'date' and 'time'. Then you can use `.dt.minute`.

**Ex:**

```
import pandas as pd
df = pd.DataFrame({'time': pd.to_timedelta(['00:30:45','00:30:45','00:21:06','00:21:06','00:21:06']),
                   'date': pd.to_datetime(['2020-02-28','2020-02-28','2020-03-09','2020-03-09','2020-03-09'])})

# to get the "total minutes":
df['minutes'] = df['time'].dt.total_seconds()/60
df['minutes']
# 0    30.75
# 1    30.75
# 2    21.10
# 3    21.10
# 4    21.10
# Name: minutes, dtype: float64

```

[[pd.Timedelta docs]](https://pandas.pydata.org/pandas-docs/stable/user_guide/timedeltas.html)

```
# to get a column of dtype datetime:
df['DateTime'] = df['date'] + df['time']

# now you can do:
df['DateTime'].dt.minute
# 0    30
# 1    30
# 2    21
# 3    21
# 4    21
# Name: DateTime, dtype: int64

```
@Fobersteiner's answer is very good, but just for completeness, I would like to add that you could also divide your column of dtype `timedelta` by a fixed `timedelta`. For instance:

```py
from datetime import timedelta
import pandas as pd
df = pd.DataFrame({'time': pd.to_timedelta(['00:30:45','00:30:45','00:21:06','00:21:06','00:21:06']),
                   'date': pd.to_datetime(['2020-02-28','2020-02-28','2020-03-09','2020-03-09','2020-03-09'])})

# to get the "total minutes":
df['minutes'] = df['time'] / timedelta(minutes=1)  # <--
df['minutes']

Out[9]: 
0    30.75
1    30.75
2    21.10
3    21.10
4    21.10
Name: minutes, dtype: float64

```

Though personally, I prefer @Fobersteiner's method.