@pandas_udf(features_schema, PandasUDFType.GROUPED_MAP)
def get_fft_features(df):
    timestamp = df['timestamp'].iloc[0]
    localtime = df['localtime'].iloc[0]
    user = df['user'].iloc[0]
    version = df['version'].iloc[0]
    start_time = timestamp
    end_time = df['timestamp'].iloc[(- 1)]
    df.drop(exclude_col_names, axis=1, inplace=True)
    df_ff = df.apply(fourier_features_pandas_udf)
    df3 = df_ff.T
    pd.set_option('display.max_colwidth', (- 1))
    df3.columns = feature_names
    output = df3.unstack().to_frame().sort_index(level=1).T
    output.columns = [f'{j}_{i}' for (i, j) in output.columns]
    basic_df = pd.DataFrame([[timestamp, localtime, user, int(version), start_time, end_time]], columns=['timestamp', 'localtime', 'user', 'version', 'start_time', 'end_time'])
    return basic_df.assign(**output)
@pandas_udf(features_schema, PandasUDFType.GROUPED_MAP)
def get_fft_features(df):
    timestamp = df['timestamp'].iloc[0]
    localtime = df['localtime'].iloc[0]
    user = df['user'].iloc[0]
    version = df['version'].iloc[0]
    start_time = timestamp
    end_time = df['timestamp'].iloc[(- 1)]
    df.drop(exclude_col_names, axis=1, inplace=True)
    df_ff = df.apply(fourier_features_pandas_udf)
    df3 = df_ff.T
    pd.set_option('display.max_colwidth', (- 1))
    df3.columns = feature_names
    output = df3.unstack().to_frame().sort_index(level=1).T
    output.columns = [f'{j}_{i}' for (i, j) in output.columns]
    basic_df = pd.DataFrame([[timestamp, localtime, user, int(version), start_time, end_time]], columns=['timestamp', 'localtime', 'user', 'version', 'start_time', 'end_time'])
    return basic_df.assign(**output)