concat_cols

hhpy.main.concat_cols(df: pandas.core.frame.DataFrame, columns: list, sep: str = '_', to_int: bool = False) → pandas.core.series.Series[source]

Concat a number of columns of a pandas DataFrame

Parameters:
  • df – Pandas DataFrame
  • columns – Names of the columns to be concat
  • sep – Separator
  • to_int – If true: Converts columns to int before concatting
Returns:

Pandas Series containing the concat columns