Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created June 8, 2020 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/7d47c6de0a21225061e91d87ff007394 to your computer and use it in GitHub Desktop.
Save aniruddha27/7d47c6de0a21225061e91d87ff007394 to your computer and use it in GitHub Desktop.
# selecting non-empty output rows
df_show = pd.DataFrame(columns=df_rule1_all.columns)
for row in range(len(df_rule1_all)):
if len(df_rule1_all.loc[row,'Output'])!=0:
df_show = df_show.append(df_rule1_all.loc[row,:])
# reset the index
df_show.reset_index(inplace=True)
df_show.drop('index',axis=1,inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment