<jupyter_start><jupyter_text>Basic EDA starting from the csv<jupyter_code>#convert to parquet to save space
import pyarrow.csv as pv
import pyarrow.parquet as pq

table = pv.read_csv('checksize.csv')
pq.write_table(table, 'checksize.csv'.replace('csv', 'parquet'))

# Check the file to see if it needs to be cleaned
parquet_file = pq.ParquetFile('checksize.parquet')
parquet_file.metadata.row_group(0)<jupyter_output><empty_output><jupyter_text>There are 3 columns, and 598119791 rows<jupyter_code>parquet_file.metadata.row_group(0).column(0)<jupyter_output><empty_output><jupyter_text>This is the Unix Time column. This can be converted to a timestamp type if needed later on. I can see the range of the data using a conversion function<jupyter_code>from datetime import datetime
print(datetime.strftime(datetime.fromtimestamp(1315922024),'%Y-%B-%d'))
print(datetime.strftime(datetime.fromtimestamp(1650017854),'%Y-%B-%d'))<jupyter_output>2011-September-13
2022-April-15<jupyter_text>The Data starts from 2011 and ends in 2022 April<jupyter_code>parquet_file.metadata.row_group(0).column(1)<jupyter_output><empty_output><jupyter_text>The price of bitcoin on the exchange ranged from $1.5 to $69000 USD.<jupyter_code>parquet_file.metadata.row_group(0).column(2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10921766072811774, 'fraction_numerical': 0.049573973663826494, 'mean_word_length': 8.163120567375886, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '604524', 'license': 'MIT', 'n_tokens_mistral': 497, 'n_tokens_neox': 448, 'n_words': 100, 'path': 'EDA.ipynb', 'repo_name': 'shaizamzaheer/tweets', 'size': '1291'}