I'm not sure that dig
reads from stdin. Rather,
The -f option makes dig operate in batch mode by reading a list of lookup requests to process from the file filename. The file contains a number of queries, one per line. Each entry in the file should be organized in the same way they would be presented as queries to dig using the command-line interface.
(from the man page)
Note as an aside that your nslookup example qualifies for this award (!) and could be rewritten as
nslookup < filename.csv
to achieve the same.