text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import os

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from datetime import datetime, timedelta, date
from statistics import mean
import copy
from keras.models import Sequential
from keras.layers import LSTM, Dropout, Dense, Activation
from sklearn.preprocessing import StandardScaler
sns.set(rc={'figure.figsize': (11, 8)})
pd.set_option('display.max_rows', 20)
pd.set_option('display.max_columns', 20)
pd.set_option('display.width', 1000)
plt.rcParams['axes.grid'] = False
import os
paths = []
for dirname, _, filenames in os.walk('/kaggle/input'):
    for filename in filenames:
        paths.append(os.path.join(dirname, filename))

lotteryPath = paths[0]

lottery = pd.read_csv(lotteryPath, encoding='latin-1')
lottery

all_balls = {}
for i in range(1, 7):
    ball_ser = lottery['Ball ' + str(i)].value_counts()
    for key in ball_ser.keys():
        all_balls[key] = all_balls.get(key, 0) + ball_ser[key]
ball_ser = lottery['Extra Ball'].value_counts()
for key in ball_ser.keys():
    all_balls[key] = all_balls.get(key, 0) + ball_ser[key]
all_balls = pd.Series(all_balls)
plt.title('Distribution of all balls')
plt.xticks(rotation=0)
sns.barplot(x=all_balls.keys(), y=all_balls.values, palette='OrRd')