I am trying to write pandas df to an output file with:
outFileName="myfile_" + gene_name #gene_name gets a new value from argparse
df.to_csv('%.csv' %outFileName, sep=',', index=False)
the error I am getting::
TypeError: %c requires int or char
I tried
outFileName=str("myfile_" + gene_name)
and got the same error. Am I missing something? I can save the df if I do not use variable as outputfile name but I need to have the variable.