0% found this document useful (0 votes)
42 views

Python For Telco Network Performance Analysis

This document analyzes LTE network performance data from an Excel file using Python libraries like Pandas and Matplotlib. It loads the data, cleans it by converting columns to proper data types, and extracts some summary statistics. Plots may be created in later code to visualize trends in the metrics over time.

Uploaded by

Sarfaraj Akram
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Python For Telco Network Performance Analysis

This document analyzes LTE network performance data from an Excel file using Python libraries like Pandas and Matplotlib. It loads the data, cleans it by converting columns to proper data types, and extracts some summary statistics. Plots may be created in later code to visualize trends in the metrics over time.

Uploaded by

Sarfaraj Akram
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

itelcotech

import matplotlib

import pandas as pd

import matplotlib.pyplot as plt

lte_data = pd.read_excel(r"C:\Users\DriveTest\Desktop\Python\LTE
PERFORMANCE.xlsx")

lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 07:00:00 5217.198072 169.331790 1245.897441
12425.916405
1 2020-04-10 18:00:00 11678.570086 1594.350755 6092.452905
27051.440422
2 2020-04-10 20:00:00 9822.325397 516.265395 2004.811968
22085.017637
3 2020-04-10 20:00:00 9731.162763 775.056277 3817.197947
23000.470680
4 2020-04-10 23:00:00 9465.983710 497.721798 3244.212422
23200.037768

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
1.258182

ueperttidl ueperttiul cqi ofdmsymboluti


0 1.725 0.400 9.135089 1.0
1 4.325 1.000 8.774130 1.0
2 3.450 0.825 7.499594 1.0
3 4.100 0.700 7.779839 1.0
4 2.975 0.500 8.316178 1.0

lte_data.describe()

dlvolume ulvolume ulthroughput dlthroughput


maxdlthroughput \
count 4813.000000 4813.000000 4811.000000 4811.000000
4813.000000
mean 4457.125778 343.963211 2554.672228 16992.152835
itelcotech

34249.033036
std 3548.206405 413.020160 1627.632311 8638.841052
16054.653895
min 0.000000 0.000000 36.400000 766.400000
0.000000
25% 1909.761382 97.205243 1522.144154 10814.523171
22793.000000
50% 3649.550071 222.347059 2199.790257 14956.279935
32025.000000
75% 5958.314010 441.600268 3120.563488 21232.982196
42897.000000
max 27102.480128 5865.054931 18278.622791 75977.438936
133814.000000

maxulthroughput prbuti spectraleffdl spectralefful \


count 4813.000000 4813.000000 4811.000000 4811.000000
mean 9511.078122 50.274595 1.939881 0.900278
std 6627.315405 29.272160 0.917445 0.431541
min 0.000000 0.300000 0.035015 0.008089
25% 4196.000000 24.275000 1.296648 0.580935
50% 8703.000000 50.525000 1.741255 0.826742
75% 13500.000000 77.275000 2.331167 1.155469
max 42136.000000 99.300000 6.972210 2.799867

ueperttidl ueperttiul cqi ofdmsymboluti


count 4813.000000 4813.000000 4811.000000 4813.000000
mean 1.276314 0.451605 9.772446 0.913280
std 1.269320 0.469134 1.538580 0.253235
min 0.000000 0.000000 3.590497 0.000000
25% 0.400000 0.150000 8.643951 1.000000
50% 0.875000 0.300000 9.623486 1.000000
75% 1.700000 0.575000 10.745974 1.000000
max 9.475000 4.950000 14.959125 1.000000

lte_data['Time'] = pd.DatetimeIndex(lte_data['Date'])

lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 07:00:00 5217.198072 169.331790 1245.897441
12425.916405
1 2020-04-10 18:00:00 11678.570086 1594.350755 6092.452905
27051.440422
2 2020-04-10 20:00:00 9822.325397 516.265395 2004.811968
22085.017637
3 2020-04-10 20:00:00 9731.162763 775.056277 3817.197947
23000.470680
4 2020-04-10 23:00:00 9465.983710 497.721798 3244.212422
23200.037768
itelcotech

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
1.258182

ueperttidl ueperttiul cqi ofdmsymboluti Time

0 1.725 0.400 9.135089 1.0 2020-04-10 07:00:00

1 4.325 1.000 8.774130 1.0 2020-04-10 18:00:00

2 3.450 0.825 7.499594 1.0 2020-04-10 20:00:00

3 4.100 0.700 7.779839 1.0 2020-04-10 20:00:00

4 2.975 0.500 8.316178 1.0 2020-04-10 23:00:00

lte_data['Time'] = lte_data['Time'].dt.time

lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 07:00:00 5217.198072 169.331790 1245.897441
12425.916405
1 2020-04-10 18:00:00 11678.570086 1594.350755 6092.452905
27051.440422
2 2020-04-10 20:00:00 9822.325397 516.265395 2004.811968
22085.017637
3 2020-04-10 20:00:00 9731.162763 775.056277 3817.197947
23000.470680
4 2020-04-10 23:00:00 9465.983710 497.721798 3244.212422
23200.037768

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
itelcotech

0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
1.258182

ueperttidl ueperttiul cqi ofdmsymboluti Time


0 1.725 0.400 9.135089 1.0 07:00:00
1 4.325 1.000 8.774130 1.0 18:00:00
2 3.450 0.825 7.499594 1.0 20:00:00
3 4.100 0.700 7.779839 1.0 20:00:00
4 2.975 0.500 8.316178 1.0 23:00:00

lte_data['Date'] = lte_data['Date'].dt.date

lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 5217.198072 169.331790 1245.897441 12425.916405

1 2020-04-10 11678.570086 1594.350755 6092.452905 27051.440422

2 2020-04-10 9822.325397 516.265395 2004.811968 22085.017637

3 2020-04-10 9731.162763 775.056277 3817.197947 23000.470680

4 2020-04-10 9465.983710 497.721798 3244.212422 23200.037768

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
1.258182

ueperttidl ueperttiul cqi ofdmsymboluti Time


0 1.725 0.400 9.135089 1.0 07:00:00
1 4.325 1.000 8.774130 1.0 18:00:00
2 3.450 0.825 7.499594 1.0 20:00:00
3 4.100 0.700 7.779839 1.0 20:00:00
4 2.975 0.500 8.316178 1.0 23:00:00
itelcotech

!pip install seaborn

Requirement already satisfied: seaborn in c:\users\drivetest\


anaconda3\lib\site-packages (0.10.0)
Requirement already satisfied: scipy>=1.0.1 in c:\users\drivetest\
anaconda3\lib\site-packages (from seaborn) (1.4.1)
Requirement already satisfied: numpy>=1.13.3 in c:\users\drivetest\
anaconda3\lib\site-packages (from seaborn) (1.18.1)
Requirement already satisfied: pandas>=0.22.0 in c:\users\drivetest\
anaconda3\lib\site-packages (from seaborn) (1.0.1)
Requirement already satisfied: matplotlib>=2.1.2 in c:\users\
drivetest\anaconda3\lib\site-packages (from seaborn) (3.1.3)
Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\
drivetest\anaconda3\lib\site-packages (from pandas>=0.22.0->seaborn)
(2.8.1)
Requirement already satisfied: pytz>=2017.2 in c:\users\drivetest\
anaconda3\lib\site-packages (from pandas>=0.22.0->seaborn) (2019.3)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\
drivetest\anaconda3\lib\site-packages (from matplotlib>=2.1.2-
>seaborn) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!
=2.1.6,>=2.0.1 in c:\users\drivetest\anaconda3\lib\site-packages (from
matplotlib>=2.1.2->seaborn) (2.4.6)
Requirement already satisfied: cycler>=0.10 in c:\users\drivetest\
anaconda3\lib\site-packages (from matplotlib>=2.1.2->seaborn) (0.10.0)
Requirement already satisfied: six>=1.5 in c:\users\drivetest\
anaconda3\lib\site-packages (from python-dateutil>=2.6.1-
>pandas>=0.22.0->seaborn) (1.14.0)
Requirement already satisfied: setuptools in c:\users\drivetest\
anaconda3\lib\site-packages (from kiwisolver>=1.0.1-
>matplotlib>=2.1.2->seaborn) (45.2.0.post20200210)

import seaborn as sns

lte_data.head(5)
lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 5217.198072 169.331790 1245.897441 12425.916405

1 2020-04-10 11678.570086 1594.350755 6092.452905 27051.440422

2 2020-04-10 9822.325397 516.265395 2004.811968 22085.017637

3 2020-04-10 9731.162763 775.056277 3817.197947 23000.470680

4 2020-04-10 9465.983710 497.721798 3244.212422 23200.037768


itelcotech

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
1.258182

ueperttidl ueperttiul cqi ofdmsymboluti Time


0 1.725 0.400 9.135089 1.0 07:00:00
1 4.325 1.000 8.774130 1.0 18:00:00
2 3.450 0.825 7.499594 1.0 20:00:00
3 4.100 0.700 7.779839 1.0 20:00:00
4 2.975 0.500 8.316178 1.0 23:00:00

lte_data.shape

(7053, 15)

lte_data.head(5)

Date dlvolume ulvolume ulthroughput


dlthroughput \
0 2020-04-10 5217.198072 169.331790 1245.897441 12425.916405

1 2020-04-10 11678.570086 1594.350755 6092.452905 27051.440422

2 2020-04-10 9822.325397 516.265395 2004.811968 22085.017637

3 2020-04-10 9731.162763 775.056277 3817.197947 23000.470680

4 2020-04-10 9465.983710 497.721798 3244.212422 23200.037768

maxdlthroughput maxulthroughput prbuti spectraleffdl


spectralefful \
0 48599.0 11902.0 91.525 1.418327
0.425727
1 47423.0 24165.0 92.325 1.567685
1.254170
2 40258.0 13946.0 90.975 2.687556
0.613141
3 39754.0 18632.0 92.425 1.304984
0.837264
4 39827.0 14043.0 86.525 1.355926
itelcotech

1.258182

ueperttidl ueperttiul cqi ofdmsymboluti Time


0 1.725 0.400 9.135089 1.0 07:00:00
1 4.325 1.000 8.774130 1.0 18:00:00
2 3.450 0.825 7.499594 1.0 20:00:00
3 4.100 0.700 7.779839 1.0 20:00:00
4 2.975 0.500 8.316178 1.0 23:00:00

plt.figure(figsize=(12,8))
sns.distplot(lte_data['dlvolume'],color='red')

<matplotlib.axes._subplots.AxesSubplot at 0xb7b04c8>

plt.figure(figsize=(12,8))
sns.distplot(lte_data['dlvolume'],color='red',bins=20)

<matplotlib.axes._subplots.AxesSubplot at 0xc193f48>
itelcotech

plt.figure(figsize=(12,8))
sns.distplot(lte_data['dlvolume'],color='red',hist=False)

<matplotlib.axes._subplots.AxesSubplot at 0xbfb47c8>

plt.figure(figsize=(12,8))
sns.distplot(lte_data['cqi'],bins=20,color='blue')
itelcotech

<matplotlib.axes._subplots.AxesSubplot at 0x936d448>

plt.figure(figsize=(12,8))
sns.distplot(lte_data['cqi'],bins=20,color='blue',hist=False)

<matplotlib.axes._subplots.AxesSubplot at 0x9708ec8>
itelcotech

plt.figure(figsize=(12,8))
sns.distplot(lte_data['cqi'],bins=20,color='blue',hist=False)
plt.title('CQI PLOT')
plt.show()
itelcotech

plt.figure(figsize=(12,8))
sns.distplot(lte_data['dlvolume'],color='red',bins=20)
plt.title('DL VOLUME')
plt.show()

plt.figure(figsize=(12,8))
sns.distplot(lte_data['spectraleffdl'],bins=20,color='green')
plt.title('SPECTRAL EFFICIENCY')
plt.show()
itelcotech

lte_data[['spectraleffdl','dlvolume']].corr()

spectraleffdl dlvolume
spectraleffdl 1.000000 0.180967
dlvolume 0.180967 1.000000

plt.figure(figsize=(12,8))
sns.kdeplot(lte_data['spectraleffdl'],color='magenta',shade=True)
plt.title('SPECTRAL EFFICIENCY')
plt.show()
itelcotech

lte_data.corr()

dlvolume ulvolume ulthroughput dlthroughput \


dlvolume 1.000000 0.574664 0.233412 0.647563
ulvolume 0.574664 1.000000 0.624785 0.253997
ulthroughput 0.233412 0.624785 1.000000 0.270986
dlthroughput 0.647563 0.253997 0.270986 1.000000
maxdlthroughput 0.590499 0.316993 0.271850 0.703806
maxulthroughput 0.358456 0.388033 0.393325 0.232821
prbuti 0.662051 0.457852 -0.016745 0.024670
spectraleffdl 0.180967 0.016115 0.262711 0.657296
spectralefful 0.109350 0.135205 0.658353 0.299655
ueperttidl 0.719908 0.597453 0.090911 0.205466
ueperttiul 0.607699 0.677272 0.094947 0.189619
cqi 0.025704 -0.056526 0.285849 0.494051
ofdmsymboluti -0.113851 -0.030847 -0.026066 -0.133939

maxdlthroughput maxulthroughput prbuti


spectraleffdl \
dlvolume 0.590499 0.358456 0.662051
0.180967
ulvolume 0.316993 0.388033 0.457852
0.016115
ulthroughput 0.271850 0.393325 -0.016745
0.262711
dlthroughput 0.703806 0.232821 0.024670
0.657296
itelcotech

maxdlthroughput 1.000000 0.307396 0.106404


0.417498
maxulthroughput 0.307396 1.000000 0.234482
0.037850
prbuti 0.106404 0.234482 1.000000 -
0.339089
spectraleffdl 0.417498 0.037850 -0.339089
1.000000
spectralefful 0.195056 0.216799 -0.162197
0.418959
ueperttidl 0.256104 0.270199 0.797205 -
0.173192
ueperttiul 0.270605 0.241231 0.617925 -
0.108034
cqi 0.319652 0.022777 -0.466373
0.757931
ofdmsymboluti -0.170622 -0.058356 -0.009260
0.010278

spectralefful ueperttidl ueperttiul cqi \


dlvolume 0.109350 0.719908 0.607699 0.025704
ulvolume 0.135205 0.597453 0.677272 -0.056526
ulthroughput 0.658353 0.090911 0.094947 0.285849
dlthroughput 0.299655 0.205466 0.189619 0.494051
maxdlthroughput 0.195056 0.256104 0.270605 0.319652
maxulthroughput 0.216799 0.270199 0.241231 0.022777
prbuti -0.162197 0.797205 0.617925 -0.466373
spectraleffdl 0.418959 -0.173192 -0.108034 0.757931
spectralefful 1.000000 -0.141371 -0.279392 0.469195
ueperttidl -0.141371 1.000000 0.771597 -0.324465
ueperttiul -0.279392 0.771597 1.000000 -0.227684
cqi 0.469195 -0.324465 -0.227684 1.000000
ofdmsymboluti -0.013844 -0.021676 0.015387 0.081726

ofdmsymboluti
dlvolume -0.113851
ulvolume -0.030847
ulthroughput -0.026066
dlthroughput -0.133939
maxdlthroughput -0.170622
maxulthroughput -0.058356
prbuti -0.009260
spectraleffdl 0.010278
spectralefful -0.013844
ueperttidl -0.021676
ueperttiul 0.015387
cqi 0.081726
ofdmsymboluti 1.000000
itelcotech

plt.figure(figsize=(12,8))
sns.scatterplot(x='dlthroughput',y='spectraleffdl',data=lte_data,s=120
)
plt.title('Throughput Vs efficiency')
plt.show()

plt.figure(figsize=(12,8))
sns.scatterplot(x='prbuti',y='spectraleffdl',data=lte_data,color='g',s
=100)
plt.title('PRB uti Vs Efficiency')
plt.show()
itelcotech

plt.figure(figsize=(12,8))
sns.scatterplot(x='prbuti',y='ueperttidl',s=100,color='blue',data=lte_
data)
plt.title('PRB UTI Vs UE/TTI')
plt.show()
itelcotech

plt.figure(figsize=(12,8))
sns.scatterplot(x='prbuti',y='dlvolume',data=lte_data,s=90,hue='spectr
aleffdl')

<matplotlib.axes._subplots.AxesSubplot at 0x941e908>
itelcotech

plt.figure(figsize=(12,8))
sns.scatterplot(x='prbuti',y='dlvolume',data=lte_data,s=90,hue='dlthro
ughput',color='green')

<matplotlib.axes._subplots.AxesSubplot at 0xcd8a748>

plt.figure(figsize=(12,8))
sns.scatterplot(x='dlthroughput',y='dlvolume',data=lte_data,s=90,hue='
prbuti',color='green')

<matplotlib.axes._subplots.AxesSubplot at 0xcd89348>
itelcotech

sns.regplot(x='spectraleffdl',y='dlthroughput',data=lte_data)

<matplotlib.axes._subplots.AxesSubplot at 0x9406fc8>

sns.regplot(x='spectraleffdl',y='ueperttidl',data=lte_data)

<matplotlib.axes._subplots.AxesSubplot at 0x110b7e08>
itelcotech

sns.regplot(x='dlthroughput',y='ueperttidl',data=lte_data)

<matplotlib.axes._subplots.AxesSubplot at 0xd8b1d88>

sns.jointplot(x='prbuti',y='dlvolume',data=lte_data,kind='reg')

<seaborn.axisgrid.JointGrid at 0x10e79808>
itelcotech

sns.jointplot(x='prbuti',y='dlthroughput',data=lte_data,kind='kde')

<seaborn.axisgrid.JointGrid at 0xe31f088>
itelcotech

sns.jointplot(x='prbuti',y='dlthroughput',data=lte_data,kind='hex')

<seaborn.axisgrid.JointGrid at 0xe2a79c8>

You might also like