Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created October 11, 2019 06:45
Show Gist options
  • Save prateekjoshi565/e53be0c2500f5e0338c32fc997aaa970 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/e53be0c2500f5e0338c32fc997aaa970 to your computer and use it in GitHub Desktop.
# extract subject
source = [i[0] for i in entity_pairs]
# extract object
target = [i[1] for i in entity_pairs]
kg_df = pd.DataFrame({'source':source, 'target':target, 'edge':relations})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment