Created
September 4, 2019 10:12
-
-
Save aravindpai/17e40e9cd9778322161f59fff078e3a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp=[] | |
i=0 | |
j=0 | |
n=len(df) - 2 | |
m=len(df) - 1 | |
while(i<=n): | |
j=i+1 | |
while(j<=m): | |
if(df['end'][i] == df['start'][j]): | |
df.loc[i,'end'] = df.loc[j,'end'] | |
temp.append(j) | |
j=j+1 | |
else: | |
i=j | |
break | |
df.drop(temp,axis=0,inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment