<jupyter_start><jupyter_text>Questions to Answer 1) How many trials were terminated, and for what reasons?2) What is the most common drug tested, and the second, and the third most common?3) How many studies have actually posted results?4) What fraction of studies that have been completed have posted results?5) What are the most common conditions, and in what fractions?6) What fraction of drugs in clinical trials have been approved for another condition?7) What are the commonly occuring 'combined modality' types? Comment specifically on those trials.8) What is the earliest trial? The latest trial?9) Put together descriptive statistics on the 'Lead Author Country'.10) Who sponsors most studies? Industry or academia?11) What are the ranges of minimum and maximum ages?  1<jupyter_code>len(df)
stopped_trials = df['WhyStopped'].value_counts()
len(stopped_trials)
len(stopped_trials)/len(df)
stopped_trials<jupyter_output><empty_output><jupyter_text>2<jupyter_code>druglist = df['DrugsTested'].value_counts()
druglist<jupyter_output><empty_output><jupyter_text>Oxytocin is the most frequently tested drug, with 22 trials. Aripiprazole has 16 trials, and cannabidiol is in third with 14 trials. Fascinating!  3<jupyter_code>postedresults = df['ResultsFirstPostDateType'].value_counts()
postedresults
41 / len(df)<jupyter_output><empty_output><jupyter_text>4<jupyter_code>conditions = df['Condition'].value_counts()
conditions
17/len(df)<jupyter_output><empty_output><jupyter_text>Lead Sponsor analysis<jupyter_code>leadsponsors = df['LeadSponsorClass'].value_counts()
leadsponsors
128 / len(df)
countries = df['LeadSponsorCountry'].value_counts()
countries<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08633944411590774, 'fraction_numerical': 0.017740981667652277, 'mean_word_length': 8.096774193548388, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '241550', 'license': 'MIT', 'n_tokens_mistral': 544, 'n_tokens_neox': 511, 'n_words': 162, 'path': 'data-analysis/spectrum_story_analysis.ipynb', 'repo_name': 'nikomccarty/spectrum-drug-tracker', 'size': '1691'}