Created
November 16, 2019 00:59
-
-
Save evu/6f6a304a161db5c625fab10055fe2dd4 to your computer and use it in GitHub Desktop.
Pandas DataFrame to tensorflow embedding projector .tsv
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
word_df.to_csv("words.tsv", sep="\t", header=False, index=False, quoting=csv.QUOTE_NONE, quotechar="", escapechar="\\") | |
vec_df.to_csv("vectors.tsv", sep="\t", header=False, index=False, quoting=csv.QUOTE_NONE, quotechar="", escapechar="\\") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@EbrahimKaram That's what the
words.tsv
file is for... row 0 of thewords.tsv
file is associated with row 0 of thevectors.tsv
file, etc. Thewords.tsv
file can just be a single column with your vector labels.