IndexError: index 43462904 is out of bounds for size 43462904
An array of length N can be indexed with 0 ... N-1:

arr = [0,1,2]
arr[0]: 0
arr[1]: 1
arr[2]: 2
len(arr): 3

In this example you try to access arr[3] which is invalid as it's the N+1st entry in the array.
I have a data set that have 43.462.904 milions of records. I try to do a group by with two variables and do an average of the third one. 
The fnuction is: df1 = df.groupby(["var1", pd.Grouper(key="var2"freq="MS")]).mean()
The error that exit is the follow: IndexError: index 43462904 is out of bounds for size 43462904
The error is because I have a long dataset? The function with a few data function