How to use the linearmodels.compat.pandas.concat function in linearmodels

To help you get started, we’ve selected a few linearmodels examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bashtage / linearmodels / linearmodels / utility.py View on Github external
def _get_series_property(self, name):
        out = ([(k, getattr(v, name)) for k, v in self._results.items()])
        cols = [v[0] for v in out]
        values = concat([v[1] for v in out], 1)
        values.columns = cols
        return values
github bashtage / linearmodels / linearmodels / panel / data.py View on Github external
def expand_categoricals(x, drop_first):
    return concat([convert_columns(x[c], drop_first) for c in x.columns], axis=1)
github bashtage / linearmodels / linearmodels / iv / data.py View on Github external
def expand_categoricals(x, drop_first):
    if x.shape[1] == 0:
        return x
    return concat([convert_columns(x[c], drop_first) for c in x.columns], axis=1)
github bashtage / linearmodels / linearmodels / compat / pandas.py View on Github external
def concat(*args, **kwargs):
    """
    Shim around pandas concat that passes sort if allowed

    See pandas.compat
    """
    if PD_LT_023 and 'sort' in kwargs:
        kwargs = kwargs.copy()
        del kwargs['sort']
    elif not PD_LT_023:
        if 'sort' not in kwargs:
            kwargs = kwargs.copy()
            kwargs['sort'] = False

    return pd.concat(*args, **kwargs)