<jupyter_start><jupyter_text>US Powerball Winning Numbers Analysis<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('data/powerball_winning_numbers.csv')
df.head()
df.tail()
df.info()
df.isna().sum()
df['Winning Numbers'][:10]<jupyter_output><empty_output><jupyter_text>**Initial Observation:**- Looks like there are 210 drawings without Multipliers, these grand prize winners did not purchase the power play option- Winning Numbers column contains all the numbers seperated by a space<jupyter_code>#next steps: 
#seperate winning numbers into individual columns
#create a frequency count of winning numbers for each pick column
#plot histograms of number frequency for each pick column
winning_numbers_array = df['Winning Numbers'].str.split(" ", 6, expand=True)
df['a'] = winning_numbers_array[0]
df['b'] = winning_numbers_array[1]
df['c'] = winning_numbers_array[2]
df['d'] = winning_numbers_array[3]
df['e'] = winning_numbers_array[4]
df['powerball'] = winning_numbers_array[5]
df = df.drop('Winning Numbers', axis=1)
df.head()<jupyter_output><empty_output><jupyter_text>---<jupyter_code>def count_freq(num_array):
    """
    Take in array 
    Return a dictionary of numbers and their frequency counts
    """
    num_list = list(num_array.values.T.flatten())
    
    freq_count = {}
    for num in num_list:
        if num in freq_count:
            freq_count[num] += 1
        else:
            freq_count[num] = 1
    return freq_count
#create frequency count for each pick
first_num = count_freq(df['a'])
second_num = count_freq(df['b'])
third_num = count_freq(df['c'])
fourth_num = count_freq(df['d'])
fifth_num = count_freq(df['e'])
powerball = count_freq(df['powerball'])
#test out plot of first number
first_num_sorted = sorted(first_num.items())

x,y = zip(first_num.items())

plt.figure(figsize=[20,10])
plt.plot(x,y)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.009854771784232365, 'mean_word_length': 5.473154362416107, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '211036', 'license': 'MIT', 'n_tokens_mistral': 673, 'n_tokens_neox': 640, 'n_words': 166, 'path': 'eda.ipynb', 'repo_name': 'mandoiwanaga/ny_lottery', 'size': '1928'}