<jupyter_start><jupyter_text>Data source<jupyter_code>issues = pd.read_csv('issues_2020_10_22.csv')<jupyter_output><empty_output><jupyter_text>Exploration of data set<jupyter_code>issues.shape
issues.describe
issues.head()
issues.tail()
issues.info()
# not useful with current data format
# issues.describe()<jupyter_output><empty_output><jupyter_text>Data cleaning<jupyter_code>import janitor
import pandas_flavor as pf
import numpy as np
# remove whitespace and change titles to lowercase
issues = issues.clean_names()
issues.head()
# remove empty rows
issues = issues.remove_empty()
issues.head()
issues.shape
# rename columns
issues = (
    issues.rename_column("creation", "creation_date")
    .rename_column("activity", "last_activity_date")
)
issues.head()
# make some columns categoricals
issues.encode_categorical(["title"])
issues.dtypes
issues = issues.change_type('creation_date', str)
issues.dtypes
issues['creation_dt'] = pd.to_datetime(issues['creation_date'], format='%Y-%m-%d.%H:%M:%S')
issues['last_activity_dt'] = pd.to_datetime(issues['last_activity_date'], format='%Y-%m-%d.%H:%M:%S')
issues.dtypes
print(issues.info())
issues.head()
print(issues['stage'].value_counts())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14566284779050737, 'fraction_numerical': 0.006546644844517185, 'mean_word_length': 8.62992125984252, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '270425', 'license': 'MIT', 'n_tokens_mistral': 428, 'n_tokens_neox': 412, 'n_words': 72, 'path': 'view-data.ipynb', 'repo_name': 'willingc/cpython-sprint', 'size': '1222'}