<jupyter_start><jupyter_text>**REFACTORING_MINER**This notebook the description of the table `REFACTORING_MINER`.First, we import the libraries we need and, then, we read the corresponding csv.<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt

refactoringMiner = pd.read_csv("../../data/raw/REFACTORING_MINER.csv")
refactoringMiner.shape<jupyter_output><empty_output><jupyter_text>We show the first rows of the table to get an idea of its content.<jupyter_code>refactoringMiner.loc[0:4]<jupyter_output><empty_output><jupyter_text>Next, for each attribute, we obtain some information.In some cases, we do not plot anything because there are lots of unique values of which we are not interested in the distribution, as they are categorical values.  projectID<jupyter_code>pd.unique(refactoringMiner["projectID"])
pd.unique(refactoringMiner["projectID"]).size
d = {}
for p in refactoringMiner["projectID"]:
  if p not in d:
    d[p] = 0
  d[p] += 1

plt.figure(figsize=(15,5))
plt.xticks(rotation=90)
plt.bar(d.keys(), d.values())<jupyter_output><empty_output><jupyter_text>commitHash<jupyter_code>commitHash = refactoringMiner["commitHash"]
commitHash
pd.unique(commitHash).size
nans = commitHash.isna().sum()
nans<jupyter_output><empty_output><jupyter_text>refactoringType<jupyter_code>refactoringType = refactoringMiner["refactoringType"]
pd.unique(refactoringType)
pd.unique(refactoringType).size<jupyter_output><empty_output><jupyter_text>Number of NaNs and no-NaNs:<jupyter_code>nans = refactoringType.isna().sum()
nans
refactoringTypeNew = refactoringType[refactoringType.notnull()]
notnans = refactoringTypeNew.count()
labels = 'NaN', 'timestamp'
plt.pie([nans, notnans], labels=labels)
d = {}
for p in refactoringTypeNew:
  if p not in d:
    d[p] = 0
  d[p] += 1

plt.figure(figsize=(15,5))
plt.xticks(rotation=90)
plt.bar(d.keys(), d.values())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1238798102266737, 'fraction_numerical': 0.008434370057986295, 'mean_word_length': 7.511210762331839, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '207772', 'license': 'MIT', 'n_tokens_mistral': 701, 'n_tokens_neox': 684, 'n_words': 143, 'path': 'notebooks/1-DataUnderstanding/1. DataDescription/8-DB-refactoring-miner.ipynb', 'repo_name': 'chus-chus/softwareDevTypes', 'size': '1897'}