<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Labels
Step1:  Classification Pipeline
<ASSISTANT_TASK:>
Python Code:
df_train = pd.DataFrame()
# MNCHN
df_train['body'] = df_mnchn['body'].append(df_mnchn['Final Keywords'])
df_train['label'] = 1
# Adolescent
df_train = df_train.append(pd.DataFrame({
    'body': df_adolescent['body'].append(df_adolescent['Final Keywords']),
    'label': 2
}))
# Geriatrics
df_train = df_train.append(pd.DataFrame({
    'body': df_geriatric['body'].append(df_geriatric['Final Keywords']),
    'label': 3
}))
# Special Populations
df_train = df_train.append(pd.DataFrame({
    'body': df_specpop['body'].append(df_specpop['Final Keywords']),
    'label': 4
}))
df_train.reset_index(drop=True, inplace=True)
# Other Disregard atm
# df_train = df_train.append(pd.DataFrame({
#     'body': df_specpop['body'].append(df_specpop['Final Keywords']),
#     'label': 4
#     set.difference(set(df.title),set(df_mnchn.AO).union(
#     set(df_adolescent.AO)).union(
#     set(df_geriatric.AO)).union(
#     set(df_specpop.AO)))
# }))
Explanation: Labels:
MNCHN = 1
Adolescent = 2
Geriatrics = 3
Special Populations = 4
Other = 5 but disregard for 1st cycle
End of explanation
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
tfid_params = {
    'stop_words':stopwords.words(), 
    'ngram_range': (1,4), 
    'strip_accents':'ascii',
    
}
text_clf = Pipeline([('vect_tfid', TfidfVectorizer(**tfid_params)),
                     ('clf', MultinomialNB()),
                     ])
model_cycle_1 = text_clf.fit(df_train.body, df_train.label)
results = pd.DataFrame(model_cycle_1.predict_proba(df.body), columns=themes)
results['AO'] = df.title
for theme in themes:
    results.sort_values(by=theme, ascending=False)[:40][['AO', theme]].to_csv(theme+'_cycle1_results.csv', index=False)
df_mnchn.drop('body', axis=1).to_csv('mnchn_cycle1_keywords.csv', index=False)
df_geriatric.drop('body', axis=1).to_csv('geriatric_cycle1_keywords.csv', index=False)
df_adolescent.drop('body', axis=1).to_csv('adolescent_cycle1_keywords.csv', index=False)
df_specpop.drop('body', axis=1).to_csv('specpop_cycle1_keywords.csv', index=False)
Explanation: Classification Pipeline
End of explanation
<END_TASK>