Skip to content

Instantly share code, notes, and snippets.

View NataliiaRastoropova's full-sized avatar

Nataliia Rastoropova NataliiaRastoropova

View GitHub Profile
CodingHours CoffeeCupsPerDay CoffeeTime CodingWithoutCoffee CoffeeType CoffeeSolveBugs Gender Country AgeRange
0 8 2 Before coding Yes Caffè latte Sometimes Female Lebanon 18 to 29
1 3 2 Before coding Yes Americano Yes Female Lebanon 30 to 39
2 5 3 While coding No Nescafe Yes Female Lebanon 18 to 29
3 8 2 Before coding No Nescafe Yes Male Lebanon NaN
4 10 3 While coding Sometimes Turkish No Male Lebanon 18 to 29
5 8 2 While coding Sometimes Nescafe Yes Male Lebanon 30 to 39
6 5 2 While coding Yes Nescafe Sometimes Male Lebanon NaN
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plot
df = pd.read_csv('..DataSet/CoffeeAndCodeLT2018.csv')
def look_at_data(dataset):
print(dataset.head(10))
print(dataset.info())
print(dataset.shape)
fig, ax = plot.subplots()
fig = sns.distplot(df['CoffeeCupsPerDay'], hist=True, kde=True,
bins=8, color = 'c',
hist_kws={'edgecolor':'black'},
kde_kws={'linewidth': 4})
ax.set_xlabel('CoffeeCupsPerDay')
ax.set_ylabel('Frequency')
ax.set_title('Histogram of cups of coffee are drunk by programmers')
plot.axvline(df['CoffeeCupsPerDay'].mean(), color='k', linestyle='dashed', linewidth=1)
min_ylim, max_ylim = plot.ylim()
array1 = []
array2 = []
array3 = []
array4 = []
n = 300
for i in range(1,n):
array1.append(df['CoffeeCupsPerDay'].sample(n=10, replace= True).mean())
array2.append(df['CoffeeCupsPerDay'].sample(n=40, replace=True).mean())
array4.append(df['CoffeeCupsPerDay'].sample(n=60, replace=True).mean())
array3.append(df['CoffeeCupsPerDay'].sample(n=80, replace=True).mean())
App Category Rating Reviews Size Installs Type Price Content Rating Genres Last Updated Current Ver Android Ver
0 Photo Editor & Candy Camera & Grid & ScrapBook ART_AND_DESIGN 4.1 159 19M 10,000+ Free 0 Everyone Art & Design January 7, 2018 1.0.0 4.0.3 and up
1 Coloring book moana ART_AND_DESIGN 3.9 967 14M 500,000+ Free 0 Everyone Art & Design;Pretend Play January 15, 2018 2.0.0 4.0.3 and up
2 U Launcher Lite – FREE Live Cool Themes, Hide ... ART_AND_DESIGN 4.7 87510 8.7M 5,000,000+ Free 0 Everyone Art & Design August 1, 2018 1.2.4 4.0.3 and up
3 Sketch - Draw & Paint ART_AND_DESIGN 4.5 215644 25M 50,000,000+ Free 0 Teen Art & Design June 8, 201
Data columns (total 13 columns):
App 10841 non-null object Price 10841 non-null object
Category 10841 non-null object Content Rating 10840 non-null object
Rating 9367 non-null float64 Genres 10841 non-null object
Reviews 10841 non-null object Last Updated 10841 non-null object
Size 10841 non-null object Current Ver 10833 non-null object
Installs 10841 non-null object Android Ver 10838 non-null object
Type 10840 non-null object
dtypes: float64(1), object(12)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol quality
count 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000
mean 8.31964 0.52782 0.27098 2.53881 0.08747 15.87492 46.46779 0.99675 3.31111 0.65815 10.42298 5.63602
std 1.74110 0.17906 0.19480 1.40993 0.04707 10.46016 32.89532 0.00189 0.15439 0.16951 1.06567 0.80757
min 4.60000 0.12000 0.00000 0.90000 0.01200 1.00000 6.00000 0.99007 2.74000 0.33000 8.40000 3.00000
25% 7.10000 0.39000 0.09000 1.90000 0.07000 7.00000 22.00000 0.99560 3.21000 0.55000 9.50000 5.00000
50% 7.90000 0.52000 0.26000 2.20000 0.07900 14.00000 38.00000 0.99675 3.31000 0.62000 10.20000 6.00000
75% 9.20000 0.64000 0.42000 2.60000 0.09000 21.00000 62.00000 0.99784 3.40000 0.73000 11.10000 6.00000
max 15.90000 1.58000 1.00000 15.50000 0.61100 72.00000 289.00000 1.00369 4.01000 2.00000 14.90000 8.00000
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol quality
1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000 1599.00000
8.31964 0.52782 0.27098 2.53881 0.08747 15.87492 46.46779 0.99675 3.31111 0.65815 10.42298 5.63602
1.74110 0.17906 0.19480 1.40993 0.04707 10.46016 32.89532 0.00189 0.15439 0.16951 1.06567 0.80757
4.60000 0.12000 0.00000 0.90000 0.01200 1.00000 6.00000 0.99007 2.74000 0.33000 8.40000 3.00000
7.10000 0.39000 0.09000 1.90000 0.07000 7.00000 22.00000 0.99560 3.21000 0.55000 9.50000 5.00000
7.90000 0.52000 0.26000 2.20000 0.07900 14.00000 38.00000 0.99675 3.31000 0.62000 10.20000 6.00000
9.20000 0.64000 0.42000 2.60000 0.09000 21.00000 62.00000 0.99784 3.40000 0.73000 11.10000 6.00000
15.90000 1.58000 1.00000 15.50000 0.61100 72.00000 289.00000 1.00369 4.01000 2.00000 14.90000 8.00000