Continuous variable to categorical by quartiles?
Panda's Categorical Data Type is designed for that type of analysis,  pandas.cut can divide by user-defined bins and pandas.qcut can create quantile-based discretization. Something like this:

import numpy as np
import pandas as pd

df = pd.DataFrame({'value': np.random.randint(1, 80, 20)}) 
df['group'] = pd.cut(df.value,
                     bins=[0, 5, 31, 51, 80],
                     labels=["very short", "short", "long", "very long"])