<jupyter_start><jupyter_text>Data Prepocessing<jupyter_code>df_churn=pd.read_csv('datasets%2F13996%2F18858%2FWA_Fn-UseC_-Telco-Customer-Churn.csv')
df_churn.head()
df_churn.dtypes
df_churn['TotalCharges']=pd.to_numeric(df_churn.TotalCharges,errors='coerce')
df_churn.dtypes
df_churn.isnull().sum(axis=0)
df_churn.dropna(subset=['TotalCharges'],axis=0,inplace=True)
df_churn.describe()
dum_churn=pd.get_dummies(df_churn['Churn'])
dum_churn
dum_churn['Yes'].value_counts()<jupyter_output><empty_output><jupyter_text>Data Analysis<jupyter_code>import seaborn as sns
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>colors = ['191970','001CF0','0038E2','0055D4','0071C6','008DB8','00AAAA','00C69C','00E28E','00FF80',]<jupyter_code>dfchurn=df_churn[df_churn.Churn=='Yes'] 
dfnochurn=df_churn[df_churn.Churn=='No'] 
# Pie chart
#colors
colors = ['lightblue','orange']
sizes=[5174,1869]
labels=['Non_Churn','Churn']
fig1, ax1 = plt.subplots()
patches, texts, autotexts = ax1.pie(sizes,colors = colors, labels=labels, autopct='%1.1f%%', startangle=90)
for text in texts:
    text.set_color('black')
for autotext in autotexts:
    autotext.set_color('grey')
# Equal aspect ratio ensures that pie is drawn as a circle
ax1.axis('equal') 
plt.tight_layout()
plt.show()<jupyter_output><empty_output><jupyter_text>1.1-How much is churn affecting the business?<jupyter_code>print('Total charges 0')
df_relation=df_churn[['gender','SeniorCitizen','Partner','Dependents','PhoneService','MultipleLines','InternetService','OnlineSecurity','DeviceProtection','TechSupport','StreamingTV','StreamingMovies','Contract','PaperlessBilling','PaymentMethod','Churn']]
df_churn.groupby(['gender','Churn']).count()<jupyter_output><empty_output><jupyter_text>gender<jupyter_code>dum_churn.rename(columns={'No':'No_churn','Yes':'churn'},inplace=True)
dfb=pd.concat([dum_churn,df_relation],axis=1)
#dfb.drop('Churn')
dfb.groupby(['gender'])['churn'].sum()
ax = sns.countplot(y="gender", hue="Churn", data=df_churn)
total = len(df_churn["gender"])
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")

anova_gender=dfchurn[['gender','Churn']]
ggrp=anova_gender.groupby(['gender']).size()
print('Client churn by gender')
ggrp<jupyter_output>Client churn by gender<jupyter_text>Senior Citizen<jupyter_code>df_grp=df_relation.groupby(['gender','Churn'],as_index=False).sum()
df_pivotg=df_grp.pivot(index='gender',columns='Churn')
df_pivotg
anova_sc=dfchurn[['SeniorCitizen','Churn']]
scgrp=anova_sc.groupby(['SeniorCitizen']).size()
print('Client churn by SeniorCitizen')
scgrp
ax = sns.countplot(y="SeniorCitizen", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>Partner<jupyter_code>ax = sns.countplot(y="Partner", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")
anova_partner=dfchurn[['Partner','Churn']]
pgrp=anova_partner.groupby(['Partner']).size()
print('Client churn by partner')
pgrp<jupyter_output>Client churn by partner<jupyter_text>Dependents<jupyter_code>anova_Dependents=dfchurn[['Dependents','Churn']]
dgrp=anova_Dependents.groupby(['Dependents']).size()
print('Client churn by Dependents')
dgrp
ax = sns.countplot(y="Dependents", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>Phone Service<jupyter_code>ax = sns.countplot(y="PhoneService", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>MultipleLines<jupyter_code>ax = sns.countplot(y="MultipleLines", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>InternetService<jupyter_code>ax = sns.countplot(y="InternetService", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>OnlineSecurity<jupyter_code>ax = sns.countplot(y="OnlineSecurity", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>OnlineBackup<jupyter_code>ax = sns.countplot(y="OnlineBackup", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>DeviceProtection<jupyter_code>ax = sns.countplot(y="DeviceProtection", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>TechSupport<jupyter_code>ax = sns.countplot(y="TechSupport", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>StreamingTV<jupyter_code>ax = sns.countplot(y="StreamingTV", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>StreamingMovies<jupyter_code>ax = sns.countplot(y="StreamingMovies", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>Contract<jupyter_code>ax = sns.countplot(y="Contract", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>PaperlessBilling<jupyter_code>ax = sns.countplot(y="PaperlessBilling", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>PaymentMethod<jupyter_code>ax = sns.countplot(y="PaymentMethod", hue="Churn", data=df_churn)
for p in ax.patches:
        percentage = '{:.1f}%'.format(100 * p.get_width()/total)
        x = p.get_x() + p.get_width()/2
        y = p.get_y() + p.get_height()/2
        ax.annotate(percentage, (x, y),fontsize=16,color="black")<jupyter_output><empty_output><jupyter_text>tenure<jupyter_code>#ax1=sns.distplot(df_churn['Churn'],hist=False,color='r',label='Churn')
sns.distplot(df_churn['tenure'],hist=False,color='b',label='tenure')
df_churn['tenure'].describe()
ax = sns.kdeplot(df_churn.tenure[(df_churn["Churn"] == 'No') ],
                color="Blue", shade = True)
ax = sns.kdeplot(df_churn.tenure[(df_churn["Churn"] == 'Yes') ],
                ax =ax, color="Red", shade= True)
ax.legend(["Not Churn","Churn"], loc='upper right')
ax.set_ylabel('Density')
ax.set_xlabel('tenure')
ax.set_title('tenure distribution by Churn')<jupyter_output><empty_output><jupyter_text>Monthly Charges<jupyter_code>sns.distplot(df_churn['MonthlyCharges'],hist=False,color='b',label='tenure')
df_churn['MonthlyCharges'].describe()
print('Monthly Charges for churner')
dfchurn['MonthlyCharges'].describe()
ax = sns.kdeplot(df_churn.MonthlyCharges[(df_churn["Churn"] == 'No') ],
                color="Blue", shade = True)
ax = sns.kdeplot(df_churn.MonthlyCharges[(df_churn["Churn"] == 'Yes') ],
                ax =ax, color="Red", shade= True)
ax.legend(["Not Churn","Churn"], loc='upper right')
ax.set_ylabel('Density')
ax.set_xlabel('Monthly Charges')
ax.set_title('Monthly distribution by Churn')
print('Monthly Charges for no_churner')
dfnochurn['MonthlyCharges'].describe()
dfmonthly=df_churn[['MonthlyCharges','Churn']]
monthlygroup=dfmonthly.groupby(['Churn']).MonthlyCharges.sum().to_frame()/ dfmonthly.MonthlyCharges.sum()
np.round(100*monthlygroup,2)
colors = ['lightblue','orange']
sizes=[69.47,30.53]
labels=['Non_Churn','Churn']
fig1, ax1 = plt.subplots()
patches, texts, autotexts = ax1.pie(sizes,colors = colors, labels=labels, autopct='%1.1f%%', startangle=90)
for text in texts:
    text.set_color('black')
for autotext in autotexts:
    autotext.set_color('grey')
# Equal aspect ratio ensures that pie is drawn as a circle
ax1.axis('equal') 
plt.tight_layout()
plt.show()<jupyter_output><empty_output><jupyter_text>TotalCharges<jupyter_code>sns.distplot(df_churn['TotalCharges'],hist=False,color='b',label='Total Charges')
df_churn['TotalCharges'].describe()
print('Total Charges for churner')
dfchurn['TotalCharges'].describe()
print('Total Charges for no_churner')
dfnochurn['TotalCharges'].describe()
dftotal=df_churn[['TotalCharges','Churn']]
totalgroup=dftotal.groupby(['Churn']).TotalCharges.sum().to_frame()/ dftotal.TotalCharges.sum()
np.round(100*totalgroup,2)
colors = ['lightblue','orange']
sizes=[82.17,17.83]
labels=['Non_Churn','Churn']
fig1, ax1 = plt.subplots()
patches, texts, autotexts = ax1.pie(sizes,colors = colors, labels=labels, autopct='%1.1f%%', startangle=90)
for text in texts:
    text.set_color('black')
for autotext in autotexts:
    autotext.set_color('grey')
# Equal aspect ratio ensures that pie is drawn as a circle
ax1.axis('equal') 
plt.tight_layout()
plt.show()
ax = sns.kdeplot(df_churn.TotalCharges[(df_churn["Churn"] == 'No') ],
                color="Blue", shade = True)
ax = sns.kdeplot(df_churn.TotalCharges[(df_churn["Churn"] == 'Yes') ],
                ax =ax, color="Red", shade= True)
ax.legend(["Not Churn","Churn"], loc='upper right')
ax.set_ylabel('Density')
ax.set_xlabel('Total Charges')
ax.set_title('Total Charges distribution by Churn')<jupyter_output><empty_output><jupyter_text>Services<jupyter_code>#anova_partner=dfchurn[['Partner','Churn']]
df_churn.columns
#pgrp=dfchurn.groupby([]).size()
#rint('Client churn by')
#pgrp
#values = dfchurn.columns[6:15]
#df0=dfchurn['Churn']
#values.union(df0)
#grouped = values.groupby(['cut','']).size()
#values = df_churn.columns[6:15].to_list()
#pgrp = list()

#for i in values:
    #anova_partner=dfchurn[[i,'Churn']]
    #pgrp=anova_partner.groupby([i]).size()
    #pgrp
    #print('Client churn by '+i)
    
#pgrp




#plt.title("InternetService", fontsize=10)
#plt.ylabel('Churn')
#plt.xlabel('InternetService')
#plt.show()


#df.groupby(['InternetService','Churn']).size().to_frame().rename(columns ={0: "size"}).reset_index()
#plt.hist(df['InternetService'])<jupyter_output><empty_output><jupyter_text>Model<jupyter_code>dfm=df_churn.drop('customerID',axis=1,inplace=True)
df_churn.dtypes
from sklearn.preprocessing import LabelEncoder
listt0=df_churn.columns.to_list()
list1=[]
list2=[]
for d in listt0 :
    if df_churn[d].dtypes == 'object':
        list1.append(d)
    else :
        list2.append(d)
print(list1,list2)    
df1=df_churn[list1]
dfcat_num=df1.apply(LabelEncoder().fit_transform)
dfcat_num.head()
dfnum=df_churn[list2]
dfnum.head()
df_model=pd.concat([dfcat_num,dfnum],axis=1)
df_model.head()
df_model.columns
y=df_model['Churn']
x=df_model[['gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines',
       'InternetService', 'OnlineSecurity', 'OnlineBackup', 'DeviceProtection',
       'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract',
       'PaperlessBilling', 'PaymentMethod', 'SeniorCitizen', 'tenure',
       'MonthlyCharges', 'TotalCharges']]
from sklearn.linear_model import LogisticRegression 
logreg=LogisticRegression
import statsmodels.api as sm
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.3, random_state=0)
logit_model=sm.Logit(y,x)
result=logit_model.fit()
print(result.summary2())
 #The p-values for most of the variables are smaller than 0.05, except for variables: gender,Partner,MultipleLines,StreamingTV,StreamingMovies,PaymentMethod. Therefore, we will remove them.
list4=['Dependents','PhoneService','InternetService','OnlineSecurity','OnlineBackup','DeviceProtection','TechSupport','Contract','PaperlessBilling','SeniorCitizen','tenure','MonthlyCharges','TotalCharges']
x1=x[list4]
logit_model1=sm.Logit(y,x1)
result1=logit_model1.fit()
print(result1.summary2())
#now the p-value is smaller than .05
# we will fit the logestic regression
from sklearn import metrics
from sklearn.model_selection import train_test_split
x1_train, x1_test, y_train, y_test = train_test_split(x1, y , test_size=0.3, random_state=0)
logistic_regression= LogisticRegression()
logistic_regression.fit(x1_train,y_train)
y_pred=logistic_regression.predict(x1_test)
print('Accuracy of logistic regression classifier on test set: {:.2f}'.format(logistic_regression.score(x1_test, y_test)))
from sklearn.metrics import confusion_matrix
confusion_matrix = confusion_matrix(y_test, y_pred)
print(confusion_matrix)
#The result is telling us that we have 1375+307 correct predictions and 248+180 incorrect predictions.
#The precision is the ratio tp / (tp + fp) where tp is the number of true positives and fp the number of false positives. The precision is intuitively the ability of the classifier to not label a sample as positive if it is negative.
#The recall is the ratio tp / (tp + fn) where tp is the number of true positives and fn the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.
from sklearn.metrics import classification_report
print(classification_report(y_test, y_pred))<jupyter_output>precision    recall  f1-score   support

           0       0.85      0.88      0.87      1555
           1       0.63      0.55      0.59       555

    accuracy                           0.80      2110
   macro avg       0.74      0.72      0.73      2110
weighted avg       0.79      0.80      0.79      2110<jupyter_text>Profil<jupyter_code>list30=x1_train.columns.to_list()
dfch=df_churn[list30]
dummies=pd.get_dummies(dfch[['Dependents','PhoneService','InternetService','OnlineSecurity','OnlineBackup','DeviceProtection','TechSupport','Contract','PaperlessBilling']])

dfa=df_churn[['SeniorCitizen','tenure','MonthlyCharges','TotalCharges','Churn','gender']]
dataprofil = pd.concat([dummies,dfa], axis = 1)
list50=dataprofil.columns.to_list()
list50
grpprofil = dataprofil[['SeniorCitizen','tenure','MonthlyCharges','TotalCharges','gender','TechSupport_No','Contract_Month-to-month','DeviceProtection_No','OnlineSecurity_No','Churn']].groupby(['Churn']).size()
grpprofil
a=dataprofil.groupby(['gender','Churn']).sum()
a
dfp=a.drop(['tenure','MonthlyCharges','TotalCharges'],axis=1,inplace=False)
dfp
b=dataprofil.groupby(['gender','Churn']).mean()
b
dfp1=b.drop(['Dependents_No','Dependents_Yes','PhoneService_No','PhoneService_Yes','InternetService_DSL','InternetService_Fiber optic','InternetService_No','OnlineSecurity_No','OnlineSecurity_No internet service','OnlineSecurity_Yes', 'OnlineBackup_No','OnlineBackup_No internet service','OnlineBackup_Yes','DeviceProtection_No','DeviceProtection_No internet service','DeviceProtection_Yes','TechSupport_No','TechSupport_No internet service','TechSupport_Yes','Contract_Month-to-month','Contract_One year','Contract_Two year','PaperlessBilling_No','PaperlessBilling_Yes','SeniorCitizen'],axis=1,inplace=False)
dfp1
dfprofil = pd.concat([dfp,dfp1], axis = 1)
dfprofil
from sklearn import preprocessing 
values = preprocessing.normalize(dfprofil)
dfprofil[['Dependents_No','Dependents_Yes','PhoneService_No','PhoneService_Yes','InternetService_DSL','InternetService_Fiber optic','InternetService_No','OnlineSecurity_No','OnlineSecurity_No internet service','OnlineSecurity_Yes', 'OnlineBackup_No','OnlineBackup_No internet service','OnlineBackup_Yes','DeviceProtection_No','DeviceProtection_No internet service','DeviceProtection_Yes','TechSupport_No','TechSupport_No internet service','TechSupport_Yes','Contract_Month-to-month','Contract_One year','Contract_Two year','PaperlessBilling_No','PaperlessBilling_Yes','SeniorCitizen','tenure','MonthlyCharges','TotalCharges']]=values
dfprofil
dfreset=dfprofil.reset_index()
dfreset['plot']=dfreset['gender']+dfreset['Churn']
dfreset
dfreset12=dfreset.drop(['gender','Churn'],axis=1,inplace=False)
dfreset12
#dfreset1.columns
dfreset13=dfreset12[['Dependents_No', 'Dependents_Yes', 'PhoneService_No','PhoneService_Yes', 'InternetService_DSL','InternetService_Fiber optic', 'InternetService_No','OnlineSecurity_No', 'OnlineSecurity_No internet service','OnlineSecurity_Yes', 'OnlineBackup_No','OnlineBackup_No internet service', 'OnlineBackup_Yes','DeviceProtection_No', 'DeviceProtection_No internet service','DeviceProtection_Yes', 'TechSupport_No','TechSupport_No internet service', 'TechSupport_Yes','Contract_Month-to-month', 'Contract_One year', 'Contract_Two year','PaperlessBilling_No', 'PaperlessBilling_Yes', 'SeniorCitizen','tenure', 'MonthlyCharges', 'TotalCharges']]*100
dfreset14=dfreset12['plot']
dfreset1=pd.concat([dfreset14,dfreset13], axis = 1)
dfreset1
dfprofil.T*100
# Libraries
import matplotlib.pyplot as plt
from math import pi
def make_spider( row, title, color):
 
    # number of variable
    categories=list(dfreset1)[:-1]
    N = len(categories)
 
    # What will be the angle of each axis in the plot? (we divide the plot / number of variable)
    angles = [n / float(N) * 2 * pi for n in range(N)]
    angles += angles[:1]
 
    # Initialise the spider plot
    ax = plt.subplot(2,2,row+1, polar=True, )
 
    # If you want the first axis to be on top:
    ax.set_theta_offset(pi / 2)
    ax.set_theta_direction(-1)
 
    # Draw one axe per variable + add labels labels yet
    plt.xticks(angles[:-1], categories, color='grey', size=55)
 
    # Draw ylabels
    ax.set_rlabel_position(0)
    plt.yticks([10,20,30], ["10","20","30"], color="grey", size=7)
    plt.ylim(0,40)
 
    # Ind1
    values=dfreset1.loc[row].drop('plot').values.flatten().tolist()
    values += values[:1]
    ax.plot(angles, values, color=color, linewidth=2, linestyle='solid')
    ax.fill(angles, values, color=color, alpha=0.4)
 
    # Add a title
    plt.title(title, size=100, color=color, y=1.1)
    plt.savefig('fig1.png')
 
   
 
# ------- PART 2: Apply to all individuals
# initialize the figure
my_dpi=10
plt.figure(figsize=(1000/my_dpi, 1000/my_dpi), dpi=my_dpi)
 
# Create a color palette:
my_palette = plt.cm.get_cmap("Set2", len(dfreset1.index))
 
# Loop to plot
for row in range(0, len(dfreset1.index)):
    make_spider( row=row, title='plot '+dfreset1['plot'][row], color=my_palette(row))

a1=a
from sklearn import preprocessing 
values1 = preprocessing.normalize(dfprofil)
a[['Dependents_No','Dependents_Yes','PhoneService_No','PhoneService_Yes','InternetService_DSL','InternetService_Fiber optic','InternetService_No','OnlineSecurity_No','OnlineSecurity_No internet service','OnlineSecurity_Yes', 'OnlineBackup_No','OnlineBackup_No internet service','OnlineBackup_Yes','DeviceProtection_No','DeviceProtection_No internet service','DeviceProtection_Yes','TechSupport_No','TechSupport_No internet service','TechSupport_Yes','Contract_Month-to-month','Contract_One year','Contract_Two year','PaperlessBilling_No','PaperlessBilling_Yes','SeniorCitizen','tenure','MonthlyCharges','TotalCharges']]=values1
a*100<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16599361382419234, 'fraction_numerical': 0.022539444027047332, 'mean_word_length': 6.389659958362248, 'pattern_counts': {'":': 0, '<': 102, '<?xml version=': 0, '>': 102, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '26', 'dir': 'jupyter-structured-clean-dedup', 'id': '528334', 'license': 'Apache-2.0', 'n_tokens_mistral': 8273, 'n_tokens_neox': 7846, 'n_words': 1186, 'path': 'draft/.ipynb_checkpoints/my_notebook-checkpoint.ipynb', 'repo_name': 'weinerkervens/churn_analysis', 'size': '21296'}