print("\n---: [21] UP_East operation :-------") df_UP_East = df[df.Service_Area == 'UP East'] print('---------------------------------------------') print("Dimension of the data frame = ",df_UP_East.shape) print('------------------------\n Column names as follows :') print('------------------------\n') count = 0 for col in df_UP_East.columns: print(count,"-->",col) count = count+1 print("\n-----------------------------\n") # available technologies in UP_East techno_UP_East = df_UP_East.groupby(['technology'])[['signal_strength']].count() print("---------------------------------") print("\t Available techonologies : ") print("-------------------------------") print(techno_UP_East) print("-------------------------------") count = 0 for row in range(len(techno_UP_East)): count = count+1 print("total no. of available technologies = ",count) print("-----------------------------\n") # UP_East 3G operation print("\n---: convert to UP_East-3G operation :-------") df_UP_East_3G = df_UP_East[df_UP_East.technology == '3G'] print('---------------------------------------------') print("Dimension of the data frame = ",df_UP_East_3G.shape) print('------------------------\n Column names as follows :') print('------------------------\n') count = 0 for col in df_UP_East_3G.columns: print(count,"-->",col) count = count+1 print("\n-----------------------------\n") # print service providers in UP_East 3G df_UP_East_3G_sp = df_UP_East_3G.groupby(['Service_provider'])[['technology']].count() print("---------------------------------") print("\t Service provider names : ") print("-------------------------------") print(df_UP_East_3G_sp) print("-------------------------------") count = 0 for row in range(len(df_UP_East_3G_sp)): count = count+1 print("total no. of service provider = ",count) print("-----------------------------\n") # df_UP_East_3G_sp_AIRTEL # df_UP_East_3G_sp_CELLONE # df_UP_East_3G_sp_IDEA # df_UP_East_3G_sp_VODAFONE print("\n---: UP_East-3G operation :-------") df_UP_East_3G_AIRTEL = df_UP_East_3G[df_UP_East_3G.Service_provider == 'AIRTEL'] df_UP_East_3G_CELLONE = df_UP_East_3G[df_UP_East_3G.Service_provider == 'CELLONE'] df_UP_East_3G_IDEA = df_UP_East_3G[df_UP_East_3G.Service_provider == 'IDEA'] df_UP_East_3G_VODAFONE = df_UP_East_3G[df_UP_East_3G.Service_provider == 'VODAFONE'] # [1-A] UP_East 3G upload plotting df_UP_East_3G_AIRTEL_upload = df_UP_East_3G_AIRTEL[df_UP_East_3G_AIRTEL.Download_Upload == 'upload'] df_UP_East_3G_CELLONE_upload = df_UP_East_3G_CELLONE[df_UP_East_3G_CELLONE.Download_Upload == 'upload'] df_UP_East_3G_IDEA_upload = df_UP_East_3G_IDEA[df_UP_East_3G_IDEA.Download_Upload == 'upload'] df_UP_East_3G_VODAFONE_upload = df_UP_East_3G_VODAFONE[df_UP_East_3G_VODAFONE.Download_Upload == 'upload'] x1 = np.arange(0,len(df_UP_East_3G_AIRTEL_upload['Data_Speed.Kbps.'])) x2 = np.arange(0,len(df_UP_East_3G_CELLONE_upload['Data_Speed.Kbps.'])) x3 = np.arange(0,len(df_UP_East_3G_IDEA_upload['Data_Speed.Kbps.'])) x4 = np.arange(0,len(df_UP_East_3G_VODAFONE_upload['Data_Speed.Kbps.'])) plt.title('[1-A] UP_East 3G upload plotting') plt.xlabel("Number of observations ----->") plt.ylabel("Data_Speed ( in Kbps.) ----->") plt.scatter(x1, df_UP_East_3G_AIRTEL_upload['Data_Speed.Kbps.'], label="[1] AIRTEL - upload", marker='*') plt.scatter(x2, df_UP_East_3G_CELLONE_upload['Data_Speed.Kbps.'], label="[2] CELLONE - upload", marker='+') plt.scatter(x3, df_UP_East_3G_IDEA_upload['Data_Speed.Kbps.'], label="[3] IDEA - upload", marker='^') plt.scatter(x4, df_UP_East_3G_VODAFONE_upload['Data_Speed.Kbps.'], label="[4] VODAFONE - upload", marker='o') plt.legend() plt.show() #[1-B] UP_East 3G download plotting df_UP_East_3G_AIRTEL_download = df_UP_East_3G_AIRTEL[df_UP_East_3G_AIRTEL.Download_Upload == 'download'] df_UP_East_3G_CELLONE_download = df_UP_East_3G_CELLONE[df_UP_East_3G_CELLONE.Download_Upload == 'download'] df_UP_East_3G_IDEA_download = df_UP_East_3G_IDEA[df_UP_East_3G_IDEA.Download_Upload == 'download'] df_UP_East_3G_VODAFONE_download = df_UP_East_3G_VODAFONE[df_UP_East_3G_VODAFONE.Download_Upload == 'download'] x1 = np.arange(0,len(df_UP_East_3G_AIRTEL_download['Data_Speed.Kbps.'])) x2 = np.arange(0,len(df_UP_East_3G_CELLONE_download['Data_Speed.Kbps.'])) x3 = np.arange(0,len(df_UP_East_3G_IDEA_download['Data_Speed.Kbps.'])) x4 = np.arange(0,len(df_UP_East_3G_VODAFONE_download['Data_Speed.Kbps.'])) plt.title('[1-B] UP_East 3G download plotting') plt.xlabel("Number of observations ----->") plt.ylabel("Data_Speed ( in Kbps.) ----->") plt.scatter(x1, df_UP_East_3G_AIRTEL_download['Data_Speed.Kbps.'], label="[1] AIRTEL - download", marker='*') plt.scatter(x2, df_UP_East_3G_CELLONE_download['Data_Speed.Kbps.'], label="[2] CELLONE - download", marker='+') plt.scatter(x3, df_UP_East_3G_IDEA_download['Data_Speed.Kbps.'], label="[3] IDEA - download", marker='^') plt.scatter(x4, df_UP_East_3G_VODAFONE_download['Data_Speed.Kbps.'], label="[4] VODAFONE - download", marker='o') plt.legend() plt.show() # UP_East 4G operation print("\n---: convert to UP_East-4G operation :-------") df_UP_East_4G = df_UP_East[df_UP_East.technology == '4G'] print('---------------------------------------------') print("Dimension of the data frame = ",df_UP_East_4G.shape) print('------------------------\n Column names as follows :') print('------------------------\n') count = 0 for col in df_UP_East_4G.columns: print(count,"-->",col) count = count+1 print("\n-----------------------------\n") # print service providers in UP_East 4G df_UP_East_4G_sp = df_UP_East_4G.groupby(['Service_provider'])[['technology']].count() print("---------------------------------") print("\t Service provider names : ") print("-------------------------------") print(df_UP_East_4G_sp) print("-------------------------------") count = 0 for row in range(len(df_UP_East_4G_sp)): count = count+1 print("total no. of service provider = ",count) print("-----------------------------\n") # df_UP_East_4G_sp_AIRTEL # df_UP_East_4G_sp_CELLONE # df_UP_East_4G_sp_IDEA # df_UP_East_4G_sp_VODAFONE # df_UP_East_4G_sp_JIO print("\n---: UP_East-4G operation :-------") df_UP_East_4G_AIRTEL = df_UP_East_4G[df_UP_East_4G.Service_provider == 'AIRTEL'] df_UP_East_4G_CELLONE = df_UP_East_4G[df_UP_East_4G.Service_provider == 'CELLONE'] df_UP_East_4G_IDEA = df_UP_East_4G[df_UP_East_4G.Service_provider == 'IDEA'] df_UP_East_4G_VODAFONE = df_UP_East_4G[df_UP_East_4G.Service_provider == 'VODAFONE'] df_UP_East_4G_JIO = df_UP_East_4G[df_UP_East_4G.Service_provider == 'JIO'] # UP_East 4G upload plotting df_UP_East_4G_AIRTEL_upload = df_UP_East_4G_AIRTEL[df_UP_East_4G_AIRTEL.Download_Upload == 'upload'] df_UP_East_4G_CELLONE_upload = df_UP_East_4G_CELLONE[df_UP_East_4G_CELLONE.Download_Upload == 'upload'] df_UP_East_4G_IDEA_upload = df_UP_East_4G_IDEA[df_UP_East_4G_IDEA.Download_Upload == 'upload'] df_UP_East_4G_VODAFONE_upload = df_UP_East_4G_VODAFONE[df_UP_East_4G_VODAFONE.Download_Upload == 'upload'] df_UP_East_4G_JIO_upload = df_UP_East_4G_JIO[df_UP_East_4G_JIO.Download_Upload == 'upload'] x1 = np.arange(0,len(df_UP_East_4G_AIRTEL_upload['Data_Speed.Kbps.'])) x2 = np.arange(0,len(df_UP_East_4G_CELLONE_upload['Data_Speed.Kbps.'])) x3 = np.arange(0,len(df_UP_East_4G_IDEA_upload['Data_Speed.Kbps.'])) x4 = np.arange(0,len(df_UP_East_4G_VODAFONE_upload['Data_Speed.Kbps.'])) x5 = np.arange(0,len(df_UP_East_4G_JIO_upload['Data_Speed.Kbps.'])) plt.title('[1-C] UP_East 4G upload plotting') plt.xlabel("Number of observations ----->") plt.ylabel("Data_Speed ( in Kbps.) ----->") plt.scatter(x1, df_UP_East_4G_AIRTEL_upload['Data_Speed.Kbps.'], label="[1] AIRTEL - upload", marker='*') plt.scatter(x2, df_UP_East_4G_CELLONE_upload['Data_Speed.Kbps.'], label="[2] CELLONE - upload", marker='+') plt.scatter(x3, df_UP_East_4G_IDEA_upload['Data_Speed.Kbps.'], label="[3] IDEA - upload", marker='^') plt.scatter(x4, df_UP_East_4G_VODAFONE_upload['Data_Speed.Kbps.'], label="[4] VODAFONE - upload", marker='o') plt.scatter(x5, df_UP_East_4G_JIO_upload['Data_Speed.Kbps.'], label="[5] JIO - upload", marker='1') plt.legend() plt.show() # UP_East 4G download plotting df_UP_East_4G_AIRTEL_download = df_UP_East_4G_AIRTEL[df_UP_East_4G_AIRTEL.Download_Upload == 'download'] df_UP_East_4G_CELLONE_download = df_UP_East_4G_CELLONE[df_UP_East_4G_CELLONE.Download_Upload == 'download'] df_UP_East_4G_IDEA_download = df_UP_East_4G_IDEA[df_UP_East_4G_IDEA.Download_Upload == 'download'] df_UP_East_4G_VODAFONE_download = df_UP_East_4G_VODAFONE[df_UP_East_4G_VODAFONE.Download_Upload == 'download'] df_UP_East_4G_JIO_download = df_UP_East_4G_JIO[df_UP_East_4G_JIO.Download_Upload == 'download'] x1 = np.arange(0,len(df_UP_East_4G_AIRTEL_download['Data_Speed.Kbps.'])) x2 = np.arange(0,len(df_UP_East_4G_CELLONE_download['Data_Speed.Kbps.'])) x3 = np.arange(0,len(df_UP_East_4G_IDEA_download['Data_Speed.Kbps.'])) x4 = np.arange(0,len(df_UP_East_4G_VODAFONE_download['Data_Speed.Kbps.'])) x5 = np.arange(0,len(df_UP_East_4G_JIO_download['Data_Speed.Kbps.'])) plt.title('[1-D] UP_East 4G download plotting') plt.xlabel("Number of observations ----->") plt.ylabel("Data_Speed ( in Kbps.) ----->") plt.scatter(x1, df_UP_East_4G_AIRTEL_download['Data_Speed.Kbps.'], label="[1] AIRTEL - download", marker='*') plt.scatter(x2, df_UP_East_4G_CELLONE_download['Data_Speed.Kbps.'], label="[2] CELLONE - download", marker='+') plt.scatter(x3, df_UP_East_4G_IDEA_download['Data_Speed.Kbps.'], label="[3] IDEA - download", marker='^') plt.scatter(x4, df_UP_East_4G_VODAFONE_download['Data_Speed.Kbps.'], label="[4] VODAFONE - download", marker='o') plt.scatter(x5, df_UP_East_4G_JIO_download['Data_Speed.Kbps.'], label="[5] JIO - download", marker='1') plt.legend() plt.show()