The intuition behind inverse document frequency (IDF) is that a word is not of much use to if it’s appearing in all the documents.
IDF = log(N/n)
where, N is the total number of rows and n is the number of rows in which the word was present.
So, calculate IDF for the same comment_text for which we calculated the term frequency.Here, more the value of IDF, means that more unique is the word.