Answer by jezrael for splitting a pandas Dataframe
If Finish value sometimes missing and need use only progressPercentage column use:shifted = df['progressPercentage'].shift()#compare difference for second 100 if together 100 (e.g. 15, 16 row) m =...
View ArticleAnswer by Carlo Allocca for splitting a pandas Dataframe
the best way I found is the following: a = dfb['progressPercentage'].shift().eq(100).cumsum() df_output = dfb.groupby([dfb.id_B,a]) for k, gp in aa: print('key='+ str(k))...
View ArticleAnswer by Bharath M Shetty for splitting a pandas Dataframe
You can divide the dataframe by progressPercentage which is equal 100. Remove the earlier index if they are consecutive.Then slice and append the dataframe to an array. Hope this helpsimport numpy as...
View Articlesplitting a pandas Dataframe
I would like to filter and split my original dataframe into a number of dataframes using the condition that progressPercentage goes from 1.0 to 100 as in the following example:Input:id_B,...
View Article