Split big file into separate files depending on column's distinct values
It would be more efficient to open each file only once,
instead of reopening every time you need it.
Two obvious approaches come to mind:


Accumulate all the lines you want to write to files into a dictionary of lists, and then write to the files one by one. Given that your content is very large, this alternative may consume too much memory and therefore not suitable for your case.
Keep a dictionary of open file handles to write to.
If the lines are ordered in such a way that the lines that should go to the same file are grouped together, then you don't even need a dictionary, you could just keep track of the previous filename, so that if the filename is the same then append to the currently open file, otherwise close the current file and open a new one.


And most certainly you don't want to open input_path_file1 twice to read the first line and then again to process the rest of the file.
Opening it once would suffice, and instead of next(file) to skip the first line,
you could store it with first_line = next(file).

The variable rows is not used, so it could be removed.

The variable unique_values is a dictionary of counts,
but the counts are not used for anything.
So this could have been a set instead of a dict.