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="\\") |
@EbrahimKaram That's what the words.tsv
file is for... row 0 of the words.tsv
file is associated with row 0 of the vectors.tsv
file, etc. The words.tsv
file can just be a single column with your vector labels.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey
Do you know any more details?
I know how to get my dataframe into a TSV but I'm not understanding how to get the labels into the data.
I don't know how to use the metadata option