Created
April 11, 2018 09:57
-
-
Save pushpankar/6bf7b350622e3552ac897d8a4a1ffd20 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
df = pd.read_csv("./data.test.pp", sep=" ", header=None, error_bad_lines=False) | |
df = df.groupby(1)[0].apply(" ".join).reset_index()[[0,1]] | |
df.to_csv("./multilabelFormat.test.tsv", sep="\t", header=None, | |
index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment