df = pd.read_csv('output_list.txt', sep=" ", header=None) # or df = pd.read_fwf('output_list.txt') You can use pandas.DataFrame.to_csv(), and setting both index and header to False: