Load Libraries¶

In [1]:
import pandas as pd
import seaborn as srn
import statistics  as sts
import matplotlib.pyplot as plt

Upload data¶

In [2]:
url = 'https://docs.google.com/spreadsheets/d/1jd3c7CpUC0pgSxLVYXSFncqVEea3hLOivc3MlNq-axo/gviz/tq?tqx=out:csv'
In [3]:
dataset = pd.read_csv(url)
In [4]:
dataset.head()
Out[4]:
Campaign Name Clicks Impressions CPC CTR Conversions CVR
0 Campaign 465 348.0 4045 $1.50 8.60% 11 3.16%
1 Campaign 57 908.0 17668 $1.48 5.14% 53 5.84%
2 Campaign 59 331.0 6464 $1.45 5.12% 18 5.44%
3 Campaign 464 909.0 17677 $1.45 5.14% 29 3.19%
4 Campaign 8 542.0 5424 $1.44 9.99% 32 5.90%

Initial Data Exploration¶

Dataset¶

In [5]:
# Size
dataset.shape
Out[5]:
(500, 7)
In [6]:
# Type
print(dataset.info())
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 500 entries, 0 to 499
Data columns (total 7 columns):
 #   Column         Non-Null Count  Dtype  
---  ------         --------------  -----  
 0   Campaign Name  500 non-null    object 
 1   Clicks         499 non-null    float64
 2   Impressions    500 non-null    int64  
 3   CPC            499 non-null    object 
 4   CTR            499 non-null    object 
 5   Conversions    500 non-null    int64  
 6   CVR            499 non-null    object 
dtypes: float64(1), int64(2), object(4)
memory usage: 27.5+ KB
None
In [7]:
# Visualize
dataset.head()
Out[7]:
Campaign Name Clicks Impressions CPC CTR Conversions CVR
0 Campaign 465 348.0 4045 $1.50 8.60% 11 3.16%
1 Campaign 57 908.0 17668 $1.48 5.14% 53 5.84%
2 Campaign 59 331.0 6464 $1.45 5.12% 18 5.44%
3 Campaign 464 909.0 17677 $1.45 5.14% 29 3.19%
4 Campaign 8 542.0 5424 $1.44 9.99% 32 5.90%

Attributes¶

In [8]:
dataset['Campaign Name'].describe()
Out[8]:
Campaign Name
count 500
unique 500
top Campaign 465
freq 1

In [9]:
dataset['Clicks'].describe()
Out[9]:
Clicks
count 499.000000
mean 589.042084
std 233.816528
min 202.000000
25% 376.500000
50% 583.000000
75% 780.000000
max 1000.000000

In [10]:
dataset['Impressions'].describe()
Out[10]:
Impressions
count 500.000000
mean 7089.748000
std 3700.703581
min 2004.000000
25% 4254.750000
50% 6358.000000
75% 8835.000000
max 19414.000000

In [11]:
dataset['CPC'].describe()
Out[11]:
CPC
count 499
unique 85
top $0.69
freq 17

In [12]:
dataset['CTR'].describe()
Out[12]:
CTR
count 499
unique 328
top 7.51%
freq 37

In [13]:
dataset['Conversions'].describe()
Out[13]:
Conversions
count 500.000000
mean 28.224000
std 11.949368
min 8.000000
25% 18.000000
50% 28.000000
75% 36.250000
max 58.000000

In [14]:
dataset['CVR'].describe()
Out[14]:
CVR
count 499
unique 225
top 5.82%
freq 8

Data Transformation¶

Treat Incorrect Data Types¶

In [15]:
# Type
print(dataset.info())
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 500 entries, 0 to 499
Data columns (total 7 columns):
 #   Column         Non-Null Count  Dtype  
---  ------         --------------  -----  
 0   Campaign Name  500 non-null    object 
 1   Clicks         499 non-null    float64
 2   Impressions    500 non-null    int64  
 3   CPC            499 non-null    object 
 4   CTR            499 non-null    object 
 5   Conversions    500 non-null    int64  
 6   CVR            499 non-null    object 
dtypes: float64(1), int64(2), object(4)
memory usage: 27.5+ KB
None

CPC¶

In [16]:
# Converting Object to Numeric
temp_cpc = pd.to_numeric(dataset['CPC'], errors='coerce')
print(temp_cpc.head())
0   NaN
1   NaN
2   NaN
3   NaN
4   NaN
Name: CPC, dtype: float64
In [17]:
# Replacing commas with periods
temp_cpc = dataset['CPC'].str.replace(',', '.', regex=True)
print(temp_cpc.head())
0    $1.50
1    $1.48
2    $1.45
3    $1.45
4    $1.44
Name: CPC, dtype: object
In [18]:
# Removing non-numeric characters such as symbols or spaces
temp_cpc = dataset['CPC'].str.replace('[^\d.]', '', regex=True)
print(temp_cpc.head())
0    1.50
1    1.48
2    1.45
3    1.45
4    1.44
Name: CPC, dtype: object
In [19]:
# Converting Object to Numeric
temp_cpc = pd.to_numeric(temp_cpc, errors='coerce')
print(temp_cpc.head())
0    1.50
1    1.48
2    1.45
3    1.45
4    1.44
Name: CPC, dtype: float64
In [20]:
dataset['CPC'] = temp_cpc
print(dataset['CPC'].head())
0    1.50
1    1.48
2    1.45
3    1.45
4    1.44
Name: CPC, dtype: float64

CTR¶

In [21]:
# Converting Object to Numeric
temp_ctr = pd.to_numeric(dataset['CTR'], errors='coerce')
print(temp_ctr.head())
0   NaN
1   NaN
2   NaN
3   NaN
4   NaN
Name: CTR, dtype: float64
In [22]:
# Replacing commas with periods
temp_ctr = dataset['CTR'].str.replace(',', '.', regex=True)
print(temp_ctr.head())
0    8.60%
1    5.14%
2    5.12%
3    5.14%
4    9.99%
Name: CTR, dtype: object
In [23]:
# Removing non-numeric characters such as symbols or spaces
temp_ctr = dataset['CTR'].str.replace('[^\d.]', '', regex=True)
print(temp_ctr.head())
0    8.60
1    5.14
2    5.12
3    5.14
4    9.99
Name: CTR, dtype: object
In [24]:
# Converting Object to Numeric
temp_ctr = pd.to_numeric(temp_ctr, errors='coerce')
print(temp_ctr.head())
0    8.60
1    5.14
2    5.12
3    5.14
4    9.99
Name: CTR, dtype: float64
In [25]:
dataset['CTR'] = temp_ctr
print(dataset['CTR'].head())
0    8.60
1    5.14
2    5.12
3    5.14
4    9.99
Name: CTR, dtype: float64

CVR¶

In [26]:
# Converting Object to Numeric
temp_cvr = pd.to_numeric(dataset['CVR'], errors='coerce')
print(temp_cvr.head())
0   NaN
1   NaN
2   NaN
3   NaN
4   NaN
Name: CVR, dtype: float64
In [27]:
# Replacing commas with periods
temp_cvr = dataset['CVR'].str.replace(',', '.', regex=True)
print(temp_cvr.head())
0    3.16%
1    5.84%
2    5.44%
3    3.19%
4    5.90%
Name: CVR, dtype: object
In [28]:
# Removing non-numeric characters such as symbols or spaces
temp_cvr = dataset['CVR'].str.replace('[^\d.]', '', regex=True)
print(temp_cvr.head())
0    3.16
1    5.84
2    5.44
3    3.19
4    5.90
Name: CVR, dtype: object
In [29]:
# Converting Object to Numeric
temp_cvr = pd.to_numeric(temp_cvr, errors='coerce')
print(temp_cvr.head())
0    3.16
1    5.84
2    5.44
3    3.19
4    5.90
Name: CVR, dtype: float64
In [30]:
dataset['CVR'] = temp_cvr
print(dataset['CVR'].head())
0    3.16
1    5.84
2    5.44
3    3.19
4    5.90
Name: CVR, dtype: float64
In [31]:
# Type
print(dataset.info())
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 500 entries, 0 to 499
Data columns (total 7 columns):
 #   Column         Non-Null Count  Dtype  
---  ------         --------------  -----  
 0   Campaign Name  500 non-null    object 
 1   Clicks         499 non-null    float64
 2   Impressions    500 non-null    int64  
 3   CPC            499 non-null    float64
 4   CTR            499 non-null    float64
 5   Conversions    500 non-null    int64  
 6   CVR            499 non-null    float64
dtypes: float64(4), int64(2), object(1)
memory usage: 27.5+ KB
None

Data Exploration and Analysis¶

Clicks¶

In [32]:
srn.boxplot(dataset['Clicks'])
plt.show()
In [33]:
srn.histplot(dataset['Clicks'],bins=5,kde=True)
Out[33]:
<Axes: xlabel='Clicks', ylabel='Count'>

Impressions¶

In [34]:
srn.boxplot(dataset['Impressions'])
Out[34]:
<Axes: ylabel='Impressions'>
In [35]:
srn.histplot(dataset['Impressions'],bins=5,kde=True)
Out[35]:
<Axes: xlabel='Impressions', ylabel='Count'>

CPC¶

In [36]:
srn.boxplot(dataset['CPC'])
Out[36]:
<Axes: ylabel='CPC'>
In [37]:
srn.histplot(dataset['CPC'],bins=5)
Out[37]:
<Axes: xlabel='CPC', ylabel='Count'>
In [38]:
dataset['CPC'].describe()
Out[38]:
CPC
count 499.000000
mean 1.359960
std 11.155968
min 0.440000
25% 0.640000
50% 0.820000
75% 1.100000
max 250.000000

In [39]:
# Creating a temporary series to show Boxplot without Outliers
temp_cpc2 = dataset['CPC']
print(temp_cpc2.head())
0    1.50
1    1.48
2    1.45
3    1.45
4    1.44
Name: CPC, dtype: float64
In [40]:
Q1 = temp_cpc2.quantile(0.25)
Q3 = temp_cpc2.quantile(0.75)
IQR = Q3 - Q1
lower_bound = Q1 - 1.5 * IQR
upper_bound = Q3 + 1.5 * IQR
filtered_data = temp_cpc2[(temp_cpc2 >= lower_bound) & (temp_cpc2 <= upper_bound)]
In [41]:
# Boxplot without Outliers
srn.boxplot(filtered_data)
Out[41]:
<Axes: ylabel='CPC'>
In [42]:
# Histogram without Outliers
bins = [0, 0.3, 0.6, 0.9, 1.2, 1.5]
srn.histplot(filtered_data,bins=bins,kde=True)
Out[42]:
<Axes: xlabel='CPC', ylabel='Count'>

CTR¶

In [43]:
srn.boxplot(dataset['CTR'])
Out[43]:
<Axes: ylabel='CTR'>
In [44]:
srn.histplot(dataset['CTR'],bins=5, kde=True)
Out[44]:
<Axes: xlabel='CTR', ylabel='Count'>

Conversions¶

In [45]:
srn.boxplot(dataset['Conversions'])
Out[45]:
<Axes: ylabel='Conversions'>
In [46]:
srn.histplot(dataset['Conversions'],bins=5,kde=True)
Out[46]:
<Axes: xlabel='Conversions', ylabel='Count'>

CVR¶

In [47]:
srn.boxplot(dataset['CVR'])
Out[47]:
<Axes: ylabel='CVR'>
In [48]:
srn.histplot(dataset['CVR'],bins=5, kde=True)
Out[48]:
<Axes: xlabel='CVR', ylabel='Count'>

Data Cleaning¶

Treat Missing Values¶

In [49]:
# Check NAN
dataset.isnull().sum()
Out[49]:
0
Campaign Name 0
Clicks 1
Impressions 0
CPC 1
CTR 1
Conversions 0
CVR 1

Clicks¶

In [50]:
# Replacing Null with the median as the distribution is asymmetric and has outliers
mediana_clicks = dataset['Clicks'].median()
dataset['Clicks'].fillna(mediana_clicks, inplace=True)

CPC¶

In [51]:
# Replacing Null with the median as the distribution is asymmetric and has outliers
mediana_cpc = dataset['CPC'].median()
dataset['CPC'].fillna(mediana_cpc, inplace=True)

CTR¶

In [52]:
# Replacing Null with the median as the distribution is asymmetric and has outliers
mediana_ctr = dataset['CTR'].median()
dataset['CTR'].fillna(mediana_ctr, inplace=True)

CVR¶

In [53]:
# Replacing Null with the median as the distribution is asymmetric and has outliers
mediana_cvr = dataset['CVR'].median()
dataset['CVR'].fillna(mediana_cvr, inplace=True)
In [54]:
# Check NAN
dataset.isnull().sum()
Out[54]:
0
Campaign Name 0
Clicks 0
Impressions 0
CPC 0
CTR 0
Conversions 0
CVR 0

Treat Duplicate Values¶

In [55]:
dup = dataset.duplicated()
print(dup)
0      False
1      False
2      False
3      False
4      False
       ...  
495    False
496    False
497    False
498    False
499    False
Length: 500, dtype: bool
In [56]:
num_dup = dataset.duplicated().sum()
print(num_dup)
0

Treat Outliers¶

Clicks¶

In [57]:
Q1 = dataset['Clicks'].quantile(0.25)
Q3 = dataset['Clicks'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_clicks = dataset[(dataset['Clicks'] < limite_inferior) | (dataset['Clicks'] > limite_superior)]
print(out_clicks)
Empty DataFrame
Columns: [Campaign Name, Clicks, Impressions, CPC, CTR, Conversions, CVR]
Index: []

Impressions¶

In [58]:
Q1 = dataset['Impressions'].quantile(0.25)
Q3 = dataset['Impressions'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_imp = dataset[(dataset['Impressions'] < limite_inferior) | (dataset['Impressions'] > limite_superior)]
print(out_imp)
    Campaign Name  Clicks  Impressions   CPC   CTR  Conversions   CVR
1     Campaign 57   908.0        17668  1.48  5.14           53  5.84
3    Campaign 464   909.0        17677  1.45  5.14           29  3.19
13   Campaign 410   974.0        18328  1.37  5.31           40  4.11
25   Campaign 483   974.0        16172  1.32  6.02           29  2.98
31   Campaign 478   928.0        15901  1.31  5.84           28  3.02
32   Campaign 479   895.0        16135  1.31  5.55           27  3.02
76   Campaign 285   997.0        19414  1.14  5.14           47  4.71
134  Campaign 389   984.0        18411  1.06  5.34           42  4.27
136   Campaign 52   988.0        19380  1.06  5.10           58  5.87
150  Campaign 197   980.0        16228  1.04  6.04           52  5.31
159  Campaign 370   988.0        16374  1.03  6.03           43  4.35
166  Campaign 148   957.0        18328  1.02  5.22           54  5.64
204  Campaign 476   920.0        15901  0.91  5.79           28  3.04
248  Campaign 339   868.0        15883  0.83  5.46           39  4.49
266  Campaign 154   978.0        16209  0.78  6.03           55  5.62
285  Campaign 327   995.0        18230  0.76  5.46           45  4.52
290  Campaign 139   914.0        15883  0.75  5.75           52  5.69
316  Campaign 443   929.0        15750  0.72  5.90           35  3.77
353  Campaign 293   962.0        15901  0.68  6.05           45  4.68
371   Campaign 51   955.0        15901  0.64  6.01           56  5.86
388  Campaign 269   857.0        15999  0.63  5.36           41  4.78
392  Campaign 290   896.0        16144  0.63  5.55           42  4.69
409  Campaign 461   955.0        15994  0.61  5.97           31  3.25
413  Campaign 401   936.0        15815  0.60  5.92           39  4.17
425  Campaign 454   955.0        15994  0.59  5.97           32  3.35
428  Campaign 455   869.0        15891  0.59  5.47           29  3.34
438  Campaign 398   997.0        16388  0.58  6.08           42  4.21
451  Campaign 229   881.0        16004  0.56  5.50           45  5.11
461  Campaign 222   974.0        16172  0.51  6.02           50  5.13
476  Campaign 221   991.0        16332  0.50  6.07           51  5.15
478  Campaign 245   854.0        15999  0.50  5.34           43  5.04

CPC¶

In [59]:
Q1 = dataset['CPC'].quantile(0.25)
Q3 = dataset['CPC'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_cpc = dataset[(dataset['CPC'] < limite_inferior) | (dataset['CPC'] > limite_superior)]
print(out_cpc)
    Campaign Name  Clicks  Impressions    CPC  CTR  Conversions   CVR
338  Campaign 317   748.0        10241  250.0  7.3           34  4.55
In [60]:
# Removing Outlier
dataset_new = dataset[(dataset['CPC'] >= limite_inferior) & (dataset['CPC'] <= limite_superior)]
dataset_new.shape
Out[60]:
(499, 7)
In [61]:
dataset=dataset_new
dataset.shape
dataset['CPC'].describe()
Out[61]:
CPC
count 499.000000
mean 0.860601
std 0.256990
min 0.440000
25% 0.640000
50% 0.820000
75% 1.090000
max 1.500000

In [62]:
dataset['CPC'].describe()
Out[62]:
CPC
count 499.000000
mean 0.860601
std 0.256990
min 0.440000
25% 0.640000
50% 0.820000
75% 1.090000
max 1.500000

CTR¶

In [63]:
Q1 = dataset['CTR'].quantile(0.25)
Q3 = dataset['CTR'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_ctr = dataset[(dataset['CTR'] < limite_inferior) | (dataset['CTR'] > limite_superior)]
print(out_ctr)
Empty DataFrame
Columns: [Campaign Name, Clicks, Impressions, CPC, CTR, Conversions, CVR]
Index: []

Conversions¶

In [64]:
Q1 = dataset['Conversions'].quantile(0.25)
Q3 = dataset['Conversions'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_conv = dataset[(dataset['Conversions'] < limite_inferior) | (dataset['Conversions'] > limite_superior)]
print(out_conv)
Empty DataFrame
Columns: [Campaign Name, Clicks, Impressions, CPC, CTR, Conversions, CVR]
Index: []

CVR¶

In [65]:
Q1 = dataset['CVR'].quantile(0.25)
Q3 = dataset['CVR'].quantile(0.75)
IQR = Q3 - Q1
limite_inferior = Q1 - 1.5 * IQR
limite_superior = Q3 + 1.5 * IQR
out_cvr = dataset[(dataset['CVR'] < limite_inferior) | (dataset['CVR'] > limite_superior)]
print(out_cvr)
Empty DataFrame
Columns: [Campaign Name, Clicks, Impressions, CPC, CTR, Conversions, CVR]
Index: []

Results¶

In [66]:
dataset[['Clicks', 'Impressions', 'CPC', 'CTR', 'Conversions', 'CVR']].describe()
Out[66]:
Clicks Impressions CPC CTR Conversions CVR
count 499.000000 499.000000 499.000000 499.000000 499.000000 499.000000
mean 588.711423 7083.432866 0.860601 8.960982 28.212425 4.857174
std 233.707926 3701.719453 0.256990 2.398614 11.958553 0.880457
min 202.000000 2004.000000 0.440000 5.010000 8.000000 2.560000
25% 376.500000 4254.500000 0.640000 7.310000 18.000000 4.325000
50% 583.000000 6358.000000 0.820000 8.850000 28.000000 4.930000
75% 780.000000 8827.000000 1.090000 10.565000 36.500000 5.645000
max 1000.000000 19414.000000 1.500000 14.960000 58.000000 6.050000
In [67]:
dataset.isnull().any()
Out[67]:
0
Campaign Name False
Clicks False
Impressions False
CPC False
CTR False
Conversions False
CVR False

Data Visualization¶

In [68]:
srn.boxplot(dataset['Clicks'],color='green')
Out[68]:
<Axes: ylabel='Clicks'>
In [69]:
srn.histplot(dataset['Clicks'],bins=5,color='green',kde=True)
plt.title('Clicks Distribution', fontsize=16)
Out[69]:
Text(0.5, 1.0, 'Clicks Distribution')
In [70]:
srn.boxplot(dataset['Clicks'],color='orange')
Out[70]:
<Axes: ylabel='Clicks'>
In [71]:
srn.histplot(dataset['Impressions'],bins=5,color='orange',kde=True)
plt.title('Impressions Distribution', fontsize=16)
Out[71]:
Text(0.5, 1.0, 'Impressions Distribution')
In [72]:
srn.boxplot(dataset['CPC'],color='violet')
Out[72]:
<Axes: ylabel='CPC'>
In [72]:

In [73]:
bins = [0, 0.3, 0.6, 0.9, 1.2, 1.5]
srn.histplot(dataset['CPC'],bins=bins,color='pink',kde=True)
plt.title('CPC Distribution', fontsize=16)
Out[73]:
Text(0.5, 1.0, 'CPC Distribution')
In [74]:
srn.boxplot(dataset['CTR'])
Out[74]:
<Axes: ylabel='CTR'>
In [75]:
srn.histplot(dataset['CTR'],bins=5,kde=True)
plt.title('CTR Distribution', fontsize=16)
Out[75]:
Text(0.5, 1.0, 'CTR Distribution')
In [76]:
srn.boxplot(dataset['Conversions'],color='purple')
Out[76]:
<Axes: ylabel='Conversions'>
In [77]:
srn.histplot(dataset['Conversions'],bins=5,color='purple',kde=True)
plt.title('Conversions Distribution', fontsize=16)
Out[77]:
Text(0.5, 1.0, 'Conversions Distribution')
In [78]:
srn.boxplot(dataset['CVR'],color='brown')
Out[78]:
<Axes: ylabel='CVR'>
In [79]:
srn.histplot(dataset['CVR'],bins=5,color='brown',kde=True)
plt.title('CVR Distribution', fontsize=16)
Out[79]:
Text(0.5, 1.0, 'CVR Distribution')
In [80]:
# Gráfico de dispersão
srn.scatterplot(data=dataset, x='Clicks', y='Impressions')
plt.title('Clicks vs Impressions',fontsize=16)
plt.show()
In [81]:
srn.scatterplot(data=dataset, x='Clicks', y='Conversions', color='green')
plt.title('Clicks vs Conversions',fontsize=16)
plt.show()
In [82]:
srn.scatterplot(data=dataset, x='CPC', y='Conversions', color='red')
plt.title('CPC vs Conversions',fontsize=16)
plt.show()
In [83]:
srn.lineplot(data=dataset, x='CPC', y='Clicks', marker='o', color='blue')
Out[83]:
<Axes: xlabel='CPC', ylabel='Clicks'>
In [84]:
srn.lineplot(data=dataset, x='CPC', y='Conversions', marker='o', color='violet')
Out[84]:
<Axes: xlabel='CPC', ylabel='Conversions'>
In [85]:
srn.lineplot(data=dataset, x='Clicks', y='Impressions', marker='o', color='green')
Out[85]:
<Axes: xlabel='Clicks', ylabel='Impressions'>
In [86]:
srn.lineplot(data=dataset, x='Clicks', y='Conversions', marker='o', color='brown')
Out[86]:
<Axes: xlabel='Clicks', ylabel='Conversions'>
In [87]:
# Definindo intervalos de CPC
cpc_bins = [0, 0.3, 0.6, 0.9, 1.2, 1.5]
dataset['CPCbin'] = pd.cut(dataset['CPC'], bins=cpc_bins)

# Média de cliques por intervalo de CPC com observed=False
mean_clicks = dataset.groupby('CPCbin', observed=False)['Clicks'].mean().sort_values()
mean_clicks.plot(kind='barh', color='purple')
plt.title('Average of Clicks per CPC Interval',fontsize=16)
plt.xlabel('Average of Clicks')
plt.ylabel('Average of CPC')
plt.show()
In [88]:
# Definindo intervalos de CPC
cpc_bins = [0, 0.3, 0.6, 0.9, 1.2, 1.5]
dataset['CPCbin'] = pd.cut(dataset['CPC'], bins=cpc_bins)

# Média de cliques por intervalo de CPC com observed=False
mean_conversions = dataset.groupby('CPCbin', observed=False)['Conversions'].mean().sort_values()
mean_conversions.plot(kind='barh',color='green')
plt.title('Average of Conversions per CPC Interval',fontsize=16)
plt.xlabel('Average of Conversions')
plt.ylabel('Average of CPC')
plt.show()