Im trying to save my dataframe which consists of 2 colums into a text file,I get this error of mismatch between array dtype,any suggestions on what i could do?
Use DataFrame.to_csv:
df.to_csv('hopefully.txt', index=False, sep=' ', header=None)
For the file to be saved without a comma, use the sep=' '. To cut off the column title, header=None.