I need to use libsvm format due to sheer memory issues. First the nans are filled with -999.0 in my pandas dataframes and then they are converted into libsvm using dump_svmlight