{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\nimport json\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\nimport re\nimport string\nimport nltk\nfrom nltk.corpus import stopwords\nimport wordcloud\nfrom sklearn import model_selection\nfrom sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer\n\n","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:39:50.034678Z","iopub.execute_input":"2022-05-17T08:39:50.035848Z","iopub.status.idle":"2022-05-17T08:39:50.783276Z","shell.execute_reply.started":"2022-05-17T08:39:50.03577Z","shell.execute_reply":"2022-05-17T08:39:50.78251Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_order = pd.read_csv('/kaggle/input/AI4Code/train_orders.csv')","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:22.489688Z","iopub.execute_input":"2022-05-17T04:31:22.489986Z","iopub.status.idle":"2022-05-17T04:31:24.058482Z","shell.execute_reply.started":"2022-05-17T04:31:22.489936Z","shell.execute_reply":"2022-05-17T04:31:24.057541Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_order.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.059878Z","iopub.execute_input":"2022-05-17T04:31:24.060168Z","iopub.status.idle":"2022-05-17T04:31:24.082164Z","shell.execute_reply.started":"2022-05-17T04:31:24.060127Z","shell.execute_reply":"2022-05-17T04:31:24.08126Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_order.tail()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.08384Z","iopub.execute_input":"2022-05-17T04:31:24.084729Z","iopub.status.idle":"2022-05-17T04:31:24.097972Z","shell.execute_reply.started":"2022-05-17T04:31:24.084669Z","shell.execute_reply":"2022-05-17T04:31:24.097139Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(train_order['id'].value_counts())","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.100474Z","iopub.execute_input":"2022-05-17T04:31:24.100778Z","iopub.status.idle":"2022-05-17T04:31:24.276377Z","shell.execute_reply.started":"2022-05-17T04:31:24.100727Z","shell.execute_reply":"2022-05-17T04:31:24.275246Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Each id is unique in train_order means no notebook is repeating","metadata":{}},{"cell_type":"markdown","source":"**Train_order is right order of cell so we have to take id from train_order and call json from train to make dataset**","metadata":{}},{"cell_type":"code","source":"train_order['id'][0]","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.278079Z","iopub.execute_input":"2022-05-17T04:31:24.278459Z","iopub.status.idle":"2022-05-17T04:31:24.286112Z","shell.execute_reply.started":"2022-05-17T04:31:24.278408Z","shell.execute_reply":"2022-05-17T04:31:24.285189Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_ancestors = pd.read_csv('/kaggle/input/AI4Code/train_ancestors.csv')","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.287936Z","iopub.execute_input":"2022-05-17T04:31:24.288901Z","iopub.status.idle":"2022-05-17T04:31:24.566945Z","shell.execute_reply.started":"2022-05-17T04:31:24.288846Z","shell.execute_reply":"2022-05-17T04:31:24.565812Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_ancestors.head()\ntrain_ancestors.shape","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.568544Z","iopub.execute_input":"2022-05-17T04:31:24.568942Z","iopub.status.idle":"2022-05-17T04:31:24.577157Z","shell.execute_reply.started":"2022-05-17T04:31:24.568891Z","shell.execute_reply":"2022-05-17T04:31:24.576139Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"b = pd.read_json('../input/AI4Code/train/00001756c60be8.json')","metadata":{"execution":{"iopub.status.busy":"2022-05-17T07:18:12.54838Z","iopub.execute_input":"2022-05-17T07:18:12.548729Z","iopub.status.idle":"2022-05-17T07:18:12.569912Z","shell.execute_reply.started":"2022-05-17T07:18:12.548695Z","shell.execute_reply":"2022-05-17T07:18:12.569261Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"b['a'] = b.index\nb.head()\n","metadata":{"execution":{"iopub.status.busy":"2022-05-17T07:43:28.864008Z","iopub.execute_input":"2022-05-17T07:43:28.864364Z","iopub.status.idle":"2022-05-17T07:43:28.876012Z","shell.execute_reply.started":"2022-05-17T07:43:28.864329Z","shell.execute_reply":"2022-05-17T07:43:28.875338Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"a = b.index\na[0]\nzz = b.loc['1862f0a6']['cell_type']\nprint(zz)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.619763Z","iopub.execute_input":"2022-05-17T04:31:24.620163Z","iopub.status.idle":"2022-05-17T04:31:24.632452Z","shell.execute_reply.started":"2022-05-17T04:31:24.620111Z","shell.execute_reply":"2022-05-17T04:31:24.631673Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"c = (train_order['cell_order'][0]).split()\n","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.633682Z","iopub.execute_input":"2022-05-17T04:31:24.634509Z","iopub.status.idle":"2022-05-17T04:31:24.645709Z","shell.execute_reply.started":"2022-05-17T04:31:24.634464Z","shell.execute_reply":"2022-05-17T04:31:24.644742Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cell_order = []\ncell_type = []\nrank = []\nids = []","metadata":{"execution":{"iopub.status.busy":"2022-05-17T04:31:24.647254Z","iopub.execute_input":"2022-05-17T04:31:24.647802Z","iopub.status.idle":"2022-05-17T04:31:24.658956Z","shell.execute_reply.started":"2022-05-17T04:31:24.647756Z","shell.execute_reply":"2022-05-17T04:31:24.657804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\"\"\"\nfor i in range(0, 139256):\n    id = train_order['id'][i]\n    json = pd.read_json('../input/AI4Code/train/' + id + '.json')\n    json_array = json.index\n    real_cell_order = (train_order['cell_order'][i]).split()\n    length = len((train_order['cell_order'][i]).split())\n    ids.append(id)\n    x = []\n    y = []\n    z = []\n    for i in json_array:\n        order = real_cell_order.index(i)\n        x.append(i)\n        y.append(order)\n        xx = json.loc[i]['cell_type']\n        z.append(xx)\n    cell_order.append(x)\n    cell_type.append(z)\n    rank.append(y)\n        \n\"\"\"\n    ","metadata":{"execution":{"iopub.status.busy":"2022-05-17T06:46:45.931775Z","iopub.execute_input":"2022-05-17T06:46:45.932198Z","iopub.status.idle":"2022-05-17T06:46:45.939718Z","shell.execute_reply.started":"2022-05-17T06:46:45.932159Z","shell.execute_reply":"2022-05-17T06:46:45.938836Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\"\"\"\nfor i in range(0, 139256):\n    id = train_order['id'][i]\n    json = pd.read_json('../input/AI4Code/train/' + id + '.json')\n    json_array = json.index\n    real_cell_order = (train_order['cell_order'][i]).split()\n    length = len((train_order['cell_order'][i]).split())\n    for i in json_array:\n        order = real_cell_order.index(i)\n        ids.append(id)\n        cell_order.append(i)\n        cell_type.append(json.loc[i]['cell_type'])\n        rank.append(order)\n        \n\"\"\"","metadata":{"execution":{"iopub.status.busy":"2022-05-17T06:14:21.089943Z","iopub.execute_input":"2022-05-17T06:14:21.09036Z","iopub.status.idle":"2022-05-17T06:40:55.513642Z","shell.execute_reply.started":"2022-05-17T06:14:21.090314Z","shell.execute_reply":"2022-05-17T06:40:55.512598Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = pd.DataFrame()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T07:48:01.647224Z","iopub.execute_input":"2022-05-17T07:48:01.647571Z","iopub.status.idle":"2022-05-17T07:48:01.653261Z","shell.execute_reply.started":"2022-05-17T07:48:01.64754Z","shell.execute_reply":"2022-05-17T07:48:01.652357Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfs = []\nfor i in range(0, 139256):\n    id = train_order['id'][i]\n    json = pd.read_json('../input/AI4Code/train/' + id + '.json')\n    json['a'] = json.index\n    json['id'] = id\n    dfs.append(json)\ntemp = pd.concat(dfs, ignore_index = True)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T07:48:07.187864Z","iopub.execute_input":"2022-05-17T07:48:07.188352Z","iopub.status.idle":"2022-05-17T08:07:16.091383Z","shell.execute_reply.started":"2022-05-17T07:48:07.188266Z","shell.execute_reply":"2022-05-17T08:07:16.090399Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.shape","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:26:48.640467Z","iopub.execute_input":"2022-05-17T08:26:48.641043Z","iopub.status.idle":"2022-05-17T08:26:48.646617Z","shell.execute_reply.started":"2022-05-17T08:26:48.641001Z","shell.execute_reply":"2022-05-17T08:26:48.645892Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:25:37.093187Z","iopub.execute_input":"2022-05-17T08:25:37.093927Z","iopub.status.idle":"2022-05-17T08:25:37.108291Z","shell.execute_reply.started":"2022-05-17T08:25:37.093871Z","shell.execute_reply":"2022-05-17T08:25:37.107469Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = temp.iloc[:,[3,2,0,1]]","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:29:25.42509Z","iopub.execute_input":"2022-05-17T08:29:25.425723Z","iopub.status.idle":"2022-05-17T08:29:26.077874Z","shell.execute_reply.started":"2022-05-17T08:29:25.425682Z","shell.execute_reply":"2022-05-17T08:29:26.076754Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:29:27.153788Z","iopub.execute_input":"2022-05-17T08:29:27.154109Z","iopub.status.idle":"2022-05-17T08:29:27.169624Z","shell.execute_reply.started":"2022-05-17T08:29:27.154079Z","shell.execute_reply":"2022-05-17T08:29:27.16878Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.rename(columns = {'a':'cell_order'}, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:31:44.75193Z","iopub.execute_input":"2022-05-17T08:31:44.752233Z","iopub.status.idle":"2022-05-17T08:31:44.758365Z","shell.execute_reply.started":"2022-05-17T08:31:44.752201Z","shell.execute_reply":"2022-05-17T08:31:44.757467Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:31:46.459848Z","iopub.execute_input":"2022-05-17T08:31:46.460201Z","iopub.status.idle":"2022-05-17T08:31:46.473249Z","shell.execute_reply.started":"2022-05-17T08:31:46.460165Z","shell.execute_reply":"2022-05-17T08:31:46.472385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.info()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:35:14.146126Z","iopub.execute_input":"2022-05-17T08:35:14.147079Z","iopub.status.idle":"2022-05-17T08:35:14.166453Z","shell.execute_reply.started":"2022-05-17T08:35:14.147024Z","shell.execute_reply":"2022-05-17T08:35:14.165652Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.shape, temp.nunique()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:36:00.58525Z","iopub.execute_input":"2022-05-17T08:36:00.585574Z","iopub.status.idle":"2022-05-17T08:36:22.559149Z","shell.execute_reply.started":"2022-05-17T08:36:00.585542Z","shell.execute_reply":"2022-05-17T08:36:22.558302Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Training dataframe has 6370646 records and 4 features.\n\nThere are two cell types: codes and markdowns\n\nSource column contains text data for the corresponding cell","metadata":{}},{"cell_type":"code","source":"temp.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:37:39.786523Z","iopub.execute_input":"2022-05-17T08:37:39.78688Z","iopub.status.idle":"2022-05-17T08:37:43.057273Z","shell.execute_reply.started":"2022-05-17T08:37:39.786843Z","shell.execute_reply":"2022-05-17T08:37:43.056229Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = temp.dropna()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:38:11.357983Z","iopub.execute_input":"2022-05-17T08:38:11.358394Z","iopub.status.idle":"2022-05-17T08:38:15.48817Z","shell.execute_reply.started":"2022-05-17T08:38:11.358353Z","shell.execute_reply":"2022-05-17T08:38:15.487188Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp['cell_type'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:38:38.094313Z","iopub.execute_input":"2022-05-17T08:38:38.094626Z","iopub.status.idle":"2022-05-17T08:38:39.320323Z","shell.execute_reply.started":"2022-05-17T08:38:38.094596Z","shell.execute_reply":"2022-05-17T08:38:39.319371Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(x = temp['cell_type'], data = temp)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:40:32.555906Z","iopub.execute_input":"2022-05-17T08:40:32.556374Z","iopub.status.idle":"2022-05-17T08:40:48.159528Z","shell.execute_reply.started":"2022-05-17T08:40:32.556331Z","shell.execute_reply":"2022-05-17T08:40:48.158851Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Text preprocessing","metadata":{}},{"cell_type":"code","source":"def clean_text(text):\n    '''Make text lowercase, remove text in square brackets,remove links,remove punctuation\n    and remove words containing numbers.'''\n    text = text.lower()\n    text = text.strip()\n    text = re.sub('\\[.*?\\]', '', text)\n    text = re.sub('https?://\\S+|www\\.\\S+', '', text)\n    text = re.sub('<.*?>+', '', text)\n    text = re.sub('[%s]' % re.escape(string.punctuation), '', text)\n    text = re.sub('\\n', '', text)\n    text = re.sub('\\w*\\d\\w*', '', text)\n    return text\n\ndef text_preprocessing(text):\n    \"\"\"\n    Cleaning and parsing the text.\n\n    \"\"\"\n    tokenizer = nltk.tokenize.RegexpTokenizer(r'\\w+')\n    nopunc = clean_text(text)\n    tokenized_text = tokenizer.tokenize(nopunc)\n    combined_text = ' '.join(tokenized_text)\n    return combined_text\n\n# code text preprocessing helped functions\n\ndef clean_code(text):\n    '''Make text lowercase, remove text in square brackets,remove links,remove punctuation\n    and remove words containing numbers.'''\n    text = text.replace('[', ' ').replace(']', ' ').replace('(', ' ').replace(')', ' ').replace('{', ' ').replace('}', ' ').replace('=', ' ').replace(',', ' ')\n    text = text.lower()\n    text = text.replace('_', '')\n    text = text.replace('\\n', ' ')\n    text = text.replace('.', ' ')\n    text = re.sub(r'\".*\"', ' ', text)\n    text = re.sub(r\"'.*'\", ' ', text)\n    text = re.sub(\"^\\d+\\s|\\s\\d+\\s|\\s\\d+$\", ' ', text)\n    text = re.sub(' +', ' ', text)\n    text = text.strip()\n    return text\n\ndef code_preprocessing(text):\n    \"\"\"\n    Cleaning and parsing the text.\n\n    \"\"\"\n    tokenizer = nltk.tokenize.RegexpTokenizer(r'\\w+')\n    nopunc = clean_code(text)\n    tokenized_text = tokenizer.tokenize(nopunc)\n    combined_text = ' '.join(tokenized_text)\n    return combined_text","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:42:36.597623Z","iopub.execute_input":"2022-05-17T08:42:36.597952Z","iopub.status.idle":"2022-05-17T08:42:36.613397Z","shell.execute_reply.started":"2022-05-17T08:42:36.597919Z","shell.execute_reply":"2022-05-17T08:42:36.61272Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n\n#Let's divide the data by cell type\n\nmarkdowns = temp[temp['cell_type'] == 'markdown']\ncodes = temp[temp['cell_type'] == 'code']\n\n","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:43:17.055365Z","iopub.execute_input":"2022-05-17T08:43:17.055715Z","iopub.status.idle":"2022-05-17T08:43:20.02577Z","shell.execute_reply.started":"2022-05-17T08:43:17.055682Z","shell.execute_reply":"2022-05-17T08:43:20.024512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"codes['source_clean'] = codes['source'].apply(str).apply(lambda x: code_preprocessing(x))\nmarkdowns['source_clean'] = markdowns['source'].apply(str).apply(lambda x: text_preprocessing(x))","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:43:27.009316Z","iopub.execute_input":"2022-05-17T08:43:27.009677Z","iopub.status.idle":"2022-05-17T08:49:28.541832Z","shell.execute_reply.started":"2022-05-17T08:43:27.009638Z","shell.execute_reply":"2022-05-17T08:49:28.540719Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = pd.concat([codes, markdowns], ignore_index = True)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:52:45.777601Z","iopub.execute_input":"2022-05-17T08:52:45.778704Z","iopub.status.idle":"2022-05-17T08:52:47.020269Z","shell.execute_reply.started":"2022-05-17T08:52:45.778631Z","shell.execute_reply":"2022-05-17T08:52:47.0196Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:52:53.631236Z","iopub.execute_input":"2022-05-17T08:52:53.631563Z","iopub.status.idle":"2022-05-17T08:52:53.645564Z","shell.execute_reply.started":"2022-05-17T08:52:53.63153Z","shell.execute_reply":"2022-05-17T08:52:53.644481Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp['text_len'] = temp['source_clean'].astype(str).apply(len)\ntemp['text_word_count'] = temp['source_clean'].apply(lambda x: len(str(x).split()))","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:53:19.808334Z","iopub.execute_input":"2022-05-17T08:53:19.80927Z","iopub.status.idle":"2022-05-17T08:53:37.581603Z","shell.execute_reply.started":"2022-05-17T08:53:19.809226Z","shell.execute_reply":"2022-05-17T08:53:37.58063Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:53:37.583516Z","iopub.execute_input":"2022-05-17T08:53:37.58377Z","iopub.status.idle":"2022-05-17T08:53:37.599823Z","shell.execute_reply.started":"2022-05-17T08:53:37.583739Z","shell.execute_reply":"2022-05-17T08:53:37.598789Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from wordcloud import WordCloud, STOPWORDS\nimport matplotlib.pyplot as plt\nstopwords = set(STOPWORDS)\n\ndef show_wordcloud(data, title = None):\n    wordcloud = WordCloud(\n        background_color='white',\n        stopwords=stopwords,\n        max_words=2000000,\n        max_font_size=40, \n        scale=2,\n        random_state=1).generate(str(data))\n\n    fig = plt.figure(1, figsize=(12, 12))\n    plt.axis('off')\n    if title: \n        fig.suptitle(title, fontsize=20)\n        fig.subplots_adjust(top=2.3)\n\n    plt.imshow(wordcloud)\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:54:37.647618Z","iopub.execute_input":"2022-05-17T08:54:37.647962Z","iopub.status.idle":"2022-05-17T08:54:37.657216Z","shell.execute_reply.started":"2022-05-17T08:54:37.647928Z","shell.execute_reply":"2022-05-17T08:54:37.656261Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"markdowns = temp[temp['cell_type'] == 'markdown']\ncodes = temp[temp['cell_type'] == 'code']","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:55:46.529171Z","iopub.execute_input":"2022-05-17T08:55:46.529509Z","iopub.status.idle":"2022-05-17T08:55:52.850184Z","shell.execute_reply.started":"2022-05-17T08:55:46.529477Z","shell.execute_reply":"2022-05-17T08:55:52.849262Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(\"Word Cloud for Codes\")\nshow_wordcloud(codes['source_clean'].values)\nprint(\"\\nWord Cloud for Markdowns\")\nshow_wordcloud(markdowns['source_clean'].values)","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:55:54.227486Z","iopub.execute_input":"2022-05-17T08:55:54.227796Z","iopub.status.idle":"2022-05-17T08:55:54.947088Z","shell.execute_reply.started":"2022-05-17T08:55:54.227761Z","shell.execute_reply":"2022-05-17T08:55:54.946394Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-17T08:57:03.183081Z","iopub.execute_input":"2022-05-17T08:57:03.183619Z","iopub.status.idle":"2022-05-17T08:57:03.199862Z","shell.execute_reply.started":"2022-05-17T08:57:03.183581Z","shell.execute_reply":"2022-05-17T08:57:03.19915Z"},"trusted":true},"execution_count":null,"outputs":[]}]}