Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def expand_categoricals(x, drop_first):
return concat([convert_columns(x[c], drop_first) for c in x.columns], axis=1)
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)
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)