Last active
June 21, 2019 05:19
-
-
Save goungoun/5739fc5e81c5df118f94d3528d6a7ccc to your computer and use it in GitHub Desktop.
vertex에 없는 edge 빼기
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
import pandas as pd | |
vtx=pd.read_csv("vtx.tsv", sep=" ") | |
edge=pd.read_csv("edge.tsv", sep=" ") | |
edge = edge[edge[':START_ID'].isin(vtx["id:ID"])] | |
edge = edge[edge[':END_ID'].isin(vtx["id:ID"])] | |
edge.to_csv("edge2.tsv", sep=" ", index=False, header = True) | |
# https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment