In pandas 20.1, with the interval type, is it possible to find the midpoint, left or center values in a series.
For example:
Create an interval datatype column, and perform some aggregation calculations over these intervals:
df_Stats = df.groupby(['month',pd.cut(df['Distances'], np.arange(0, 135,1))]).agg(aggregations)
This returns df_Stats with an interval column datatype : df['Distances']
Now I want to associate the left end of the interval to the result of these aggregations using a series function:
df['LeftEnd'] = df['Distances'].left
However, I can run this element wise:
df.loc[0]['LeftEnd'] = df.loc[0]['Distances'].left
This works. Thoughts?