You need to first create a CSV file then write into the file and then append it to the data frame.
with open('file.csv', 'a') as file:
file.write('Custom String\n')
df.to_csv(file, header=False, index=False)
Click on this to see a similar solution.
You can use the below code in your case:
with open('file.csv', 'a') as file:
file.write('numrows numcols note\n')
df.to_csv(file, header=False, index=False)
Learn Python for Data Science Course to improve your technical knowledge.