0

I have timeseries data with application number, loan amount. How do I get group by count of applications and average loan amount using featuretools package without adding a relationship of month year back to main entity?

I have already accomplished this using pandas but I am trying to explore featuretools package and was wondering if it has group by like functionality.

Below the example of pandas version: I want to replicate it using featuretools.

#Creating a copy of the existing data frame
new_df=df[:] 

#Creating values
new_df['year'] = new_df['DATE'].dt.year
new_df['month'] = new_df['DATE'].dt.month

#Sorting Values
new_df=new_df.drop_duplicates().sort_values(by=['var_1','var2','year','month'])

#Counting Distinct variable across 4 variables then taking cummulative sum across 2 variables and storing it in a new data frame
new_df_count_cummulative=new_df.groupby(['var_1','var_2','year','month']).var_3.nunique().groupby(['var_1','var_2']).cumsum()

0 Answers0