<jupyter_start><jupyter_text>.txt to .csv converter--- <NAME>Observatorio Astronómico Nacional\Facultad de Ciencias\Universidad Nacional de Colombia---  About this notebookIn this worksheet, we present a code to read a .txt file using `pandas` and writes a .csv file with the data, inserting the column names.---<jupyter_code>import pandas as pd
read_file = pd.read_table('hubble.txt', delim_whitespace=True, names=('Name','N_measurements','velocity','mean_m'))
read_file.to_csv (r'hubble.csv', index=None)
read_file<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11721611721611722, 'fraction_numerical': 0.0, 'mean_word_length': 6.493150684931507, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '421694', 'license': 'MIT', 'n_tokens_mistral': 181, 'n_tokens_neox': 177, 'n_words': 51, 'path': '20. Machine Learning I. Regression/HubbleData/txt2csv.ipynb', 'repo_name': 'ashcat2005/AstrofisicaComputacional2022', 'size': '556'}