def to_monthly ( series , method = 'ffill' , how = 'end' ) : return series . asfreq_actual ( 'M' , method = method , how = how )
python series without freq
Convenience method that wraps asfreq_actual with M param ( method = ffill how = end ) .
def to_monthly(series, method='ffill', how='end'):
    """
    Convenience method that wraps asfreq_actual
    with 'M' param (method='ffill', how='end').
    """
    return series.asfreq_actual('M', method=method, how=how)