morpheus.utils.column_info#
Functions
|
Returns the array series |
|
Create a new integer column counting unique occurrences of values in |
|
Processes a dataframe according to the given schema. |
Classes
|
Subclass of |
|
Defines a single column and type-cast. |
|
Subclass of |
|
Defines the schema specifying the columns to be included in the output |
|
Subclass of |
|
Subclass of |
|
Subclass of |
|
Represents the result of preparing a DataFrame along with avilable columns to be preserved. |
|
Subclass of |
|
Subclass of |
|
Subclass of |
- column_listjoin(df, col_name)[source]#
Returns the array series
df[col_name]as flattened string series.- Parameters:
- dfpandas.DataFrame
The dataframe from which to get the column.
- col_namestr
The column to transform.
- Returns:
- pandas.Series
A series with the arrays in the column flattened to strings.
- create_increment_col(
- df,
- column_name,
- groupby_column='username',
- timestamp_column='timestamp',
- period='D',
Create a new integer column counting unique occurrences of values in
column_namegrouped per-day using the timestamp values intimestamp_columnand then grouping bygroupby_columnreturning incrementing values starting at1.- Parameters:
- dfpandas.DataFrame
The input dataframe.
- column_namestr
Name of the column in which unique occurrences are counted.
- groupby_columnstr, default “username”
The column to group by.
- timestamp_columnstr, default “timestamp”
The column containing timestamp values.
- period: str, default “D”
The period to group by.
- Returns:
- pandas.Series
The new column with incrementing values.