Tiny suggestion -- I was confused when I was working through the TF-IDF calculations on my calculator, because I got different values.
It turns out that np.log() uses base e but my calculator (and excel and Google's browser calculator) use base 10.
It might be worth noting this in the sidebar, in case others get confused by this.