{"id":46696,"date":"2022-05-12T00:00:00","date_gmt":"2022-05-12T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/"},"modified":"2026-03-30T14:06:55","modified_gmt":"2026-03-30T21:06:55","slug":"telecom-churn-prediction-using-machine-learning-python-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/","title":{"rendered":"Telecom Churn Prediction using Machine Learning, Python, and GridDB"},"content":{"rendered":"<p>Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then defined as the rate by which a company loses customers in a given time frame. For example, a churn rate of 15%\/year means that a company loses 15% of its total customer base every year. Customer churn takes special importance in the telecommunication sector, given the increasing competition and appearance of new telecommunication companies. For this reason, the telecom industry expects high churn rates every year.<\/p>\n<blockquote><p>\n  The churn rate in the telecom industry is approximately 1.9% every month and can raise to 67% every year. Source\n<\/p><\/blockquote>\n<p>This directly impacts the customer retention rate, a risk that companies consider very carefully.<\/p>\n<blockquote><p>\n  As explained by the same article, the cost of acquisition of new customers in the telecom industry is 25 times greater that the cost of customer retention; another reason that makes churn rate decisive in this sector.\n<\/p><\/blockquote>\n<p>Advanced machine learning algorithms collaborate with business concepts like retention rate to provide business intelligence solutions. In this article, we describe a model to predict the churn rate in the telecom industry thanks to an extensive and detailed dataset. For this purpose we combine a set of technologies including Python, GridDB and machine learning algorithms, to deploy this solution in a real-life production environment. In this article, we begin by setting up the execution of environment. Then we introduce the dataset used in this study. We also import the necessary Python libraries to load the dataset. We make use of different python libraries to explore the dataset. After that, we describe the model of the machine learning algorithm that we evaluate to obtain the prediction results.<\/p>\n<h2>Setting up your environment<\/h2>\n<p>In order to successfully complete the operations performed in this article, here is a list of things to recreate our context of executions:<\/p>\n<ul>\n<li>Windows 10, Anaconda, Jupiter Notebook<\/li>\n<li>Python 3.8 &#8211; <a href=\"https:\/\/github.com\/griddb\/python_client\/releases\/tag\/0.8.3\">MSI for GridDB Python Client 0.8.3<\/a> <\/li>\n<li><a href=\"https:\/\/github.com\/griddb\/c_client\/releases\/tag\/v4.5.0\">MSI for GridDB C Client<\/a> &#8211; <\/li>\n<li>Swig 4.0.2<\/li>\n<\/ul>\n<p>For GridDB Python client installation using pip, please refer to the following links: <a href=\"https:\/\/pypi.org\/project\/griddb-python-client\/\">pip install griddb-python-client<\/a> <a href=\"https:\/\/pypi.org\/project\/griddb-python\/\">pip install griddb-python<\/a><\/p>\n<h2>Introduction to the dataset<\/h2>\n<p>The dataset used in this article is representative as it counts with 7043 rows each representing a customer. The dataset has 27 different attributes. The dataset is open source and is available in the following <a href=\"https:\/\/www.kaggle.com\/bandiatindra\/telecom-churn-prediction\/notebook\">Kaggle notebook<\/a>. Here are some of the important attributes that will be mentioned later in the article:<\/p>\n<ul>\n<li><code>Gender<\/code>: customer is male or female<\/li>\n<li><code>SeniorCitizen<\/code>: customer is senior citizen of nor<\/li>\n<li><code>Tenure<\/code>: number of months of customer business with the company<\/li>\n<li><code>OnlineSecurity<\/code>: customer has online security or not<\/li>\n<li>Other attributes like <code>PhoneService<\/code>, <code>MultipleLines<\/code>, <code>InternetService<\/code><\/li>\n<\/ul>\n<p>We will further investigate the attributes as well as their types in future sections.<\/p>\n<h2>Importing the necessary libraries<\/h2>\n<p>In other to accomplish the process explained in this article, we will need to import some Python libraries. In our Jupyter notebook, we insert the following lines:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\nimport numpy as nump # linear algebra\nimport pandas as pand #  data processing, read CSV file\nimport seaborn as seab#  data visualization\nimport matplotlib.pyplot as plot #calculate plots\nimport griddb_python as griddb #application database\n<\/code><\/pre>\n<\/div>\n<h2>Loading the Dataset<\/h2>\n<p>In order to load the dataset we make use of the pandas library that we imported in the previous section:<\/p>\n<div class=\"clipboard\">\n<pre><code>telecom_customers = pand.read_csv('Churn.csv')<\/code><\/pre>\n<\/div>\n<p>We use pandas library to get an extract of the dataset, thanks to the head function, that looks as follows:<\/p>\n<div class=\"clipboard\">\n<pre><code>telecom_customers.head()<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">customerID   gender  SeniorCitizen   Partner Dependents  tenure  PhoneService    MultipleLines   InternetService OnlineSecurity  ... DeviceProtection    TechSupport StreamingTV StreamingMovies Contract    PaperlessBilling    PaymentMethod   MonthlyCharges  TotalCharges    Churn\n0   7590-VHVEG  Female  0   Yes No  1   No  No phone service    DSL No  ... No  No  No  No  Month-to-month  Yes Electronic check    29.85   29.85   No\n1   5575-GNVDE  Male    0   No  No  34  Yes No  DSL Yes ... Yes No  No  No  One year    No  Mailed check    56.95   1889.5  No\n2   3668-QPYBK  Male    0   No  No  2   Yes No  DSL Yes <\/code><\/pre>\n<\/div>\n<p>In order to build our GridDB database model, we need to obtain all the attributes of the database. For this we use the following line:<\/p>\n<div class=\"clipboard\">\n<pre><code>telecom_customers.columns.values<\/code><\/pre>\n<\/div>\n<p>This command outputs an array containing all attribute names:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">array(['customerID', 'gender', 'SeniorCitizen', 'Partner', 'Dependents',\n       'tenure', 'PhoneService', 'MultipleLines', 'InternetService',\n       'OnlineSecurity', 'OnlineBackup', 'DeviceProtection',\n       'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract',\n       'PaperlessBilling', 'PaymentMethod', 'MonthlyCharges',\n       'TotalCharges', 'Churn'], dtype=object)\n<\/code><\/pre>\n<\/div>\n<p>However, we need to know the data types of these attributes in order to map them with the GridDB database model. For this purpose, we use the following line:<\/p>\n<div class=\"clipboard\">\n<pre><code>Telecom_customers.dtypes<\/code><\/pre>\n<\/div>\n<p>And we obtain the types of all attributes:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">customerID           object\ngender               object\nSeniorCitizen         int64\nPartner              object\nDependents           object\ntenure                int64\nPhoneService         object\nMultipleLines        object\nInternetService      object\nOnlineSecurity       object\nOnlineBackup         object\nDeviceProtection     object\nTechSupport          object\nStreamingTV          object\nStreamingMovies      object\nContract             object\nPaperlessBilling     object\nPaymentMethod        object\nMonthlyCharges      float64\nTotalCharges         object\nChurn                object\ndtype: objec<\/code><\/pre>\n<\/div>\n<p>First, we will begin by detecting the null values in our dataset and replacing them with any value. We will also remove the customerID column, as it is not relevant for our data model. We will also replace the churn attribute values from Yes\/No to a boolean True\/False to match our GridDB data architecture. In fact, as we will define most attributes as booleans, we will do this with all categorical attributes of the dataset. This is achieved with the following lines of code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\ntelecom_customers.dropna(inplace = True)\n \ndataframe = telecom_customers.iloc[:,1:]\n\ndataframe['Churn'].replace(to_replace='Yes', value=True, inplace=True)\ndataframe['Churn'].replace(to_replace='No',  value=False, inplace=True)\n<\/code><\/pre>\n<\/div>\n<p>Also, we will replace all categorical attributes into dummy variables. We will see in later sections that these dummy variables will be used to build our machine learning algorithm:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">dataframeDummies = pand.get_dummies(dataframe)\ndataframeDummies.head()\n<\/code><\/pre>\n<\/div>\n<p>As we can observe, boolean attributes like gender, are now treated as booleans, instead of objects. Having this in mind, we begin building our GridDB database mode, by mapping each of the attributes of the dataset to GridDB:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">conInfo = griddb.ContainerInfo(\"column1\",\n                    [[\"customerID\", griddb.Type.STRING],\n                    [\"gender\", griddb.Type.STRING],\n                    [\"SeniorCitizen\", griddb.Type.BOOL],\n                    [\"Partner\", griddb.Type.BOOL],\n                    [\"Dependents\", griddb.Type.BOOL],\n                    [\"tenure\", griddb.Type.LONG],\n                    [\"PhoneService\", griddb.Type.BOOL],\n                    [\"MultipleLines\", griddb.Type.BOOL],\n                    [\"InternetService\", griddb.Type.STRING],\n                    [\"OnlineSecurity\", griddb.Type.BOOL],\n                    [\"OnlineBackup\", griddb.Type.BOOL],\n                    [\"DeviceProtection\", griddb.Type.BOOL],\n                    [\"TechSupport\", griddb.Type.BOOL],\n                    [\"StreamingTV\", griddb.Type.BOOL],\n                    [\"StreamingMovies\", griddb.Type.BOOL],\n                    [\"Contract\", griddb.Type.String],\n                    [\"PaperlessBilling\", griddb.Type.BOOL],\n                    [\"PaymentMethod\", griddb.Type.STRING],\n                    [\"MonthlyCharges\", griddb.Type.FLOAT],\n                    [\"TotalCharges\", griddb.Type.FLOAT],\n                    [\"Churn\", griddb.Type.BLOB]],\n                    griddb.ContainerType.COLLECTION, True)\n    col = gridstore.put_container(conInfo)\n<\/code><\/pre>\n<\/div>\n<p>For more information on how to obtain a GridDB instance, a store, and create a collection, please visit the official GitHub repository, which includes multiple<a href=\"https:\/\/github.com\/griddb\/python_client\/tree\/master\/sample\"> samples for GridDB in Python<\/a>.<\/p>\n<p>Do not forget to add an index for the primary key of the model, the customerID:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\"> col.create_index(\"customerID\", griddb.IndexType.DEFAULT)\n<\/code><\/pre>\n<\/div>\n<p>Now we need to obtain the data in the dataset and store it in GridDB. We achieve this with the following code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">filename = 'churn.csv'\n    with open(filename, 'r') as csvfile:\n    datareader = csv.reader(csvfile)\n    for row in datareader:\n        toGriddb = col.put(row)\n    col.commit();\n<\/code><\/pre>\n<\/div>\n<p>To make sure that the data was uploaded correctly, we perform a query:<\/p>\n<div class=\"clipboard\">\n<pre><code>query=col.query(\"select * where gender = 'Female'\")<\/code><\/pre>\n<\/div>\n<p>After we have verified that GridDB successfully holds the data, let us continue by an exploratory data analysis.<\/p>\n<h2>Exploratory Data Analysis<\/h2>\n<p>At this point, we are ready to perform an exploratory data analysis. First, we should begin by establishing a correlation between the attributes in the dataset with the churn attribute, the main focus of our study. To perform this correlation, we use the following line of code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">plot.figure(figsize=(15,8))\ndataframe_dummies.corr()['Churn'].sort_values(ascending = False).plot(kind='bar')\n<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/churncorrelation.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/churncorrelation.png\" alt=\"\" width=\"882\" height=\"669\" class=\"aligncenter size-full wp-image-28126\" srcset=\"\/wp-content\/uploads\/2022\/03\/churncorrelation.png 882w, \/wp-content\/uploads\/2022\/03\/churncorrelation-300x228.png 300w, \/wp-content\/uploads\/2022\/03\/churncorrelation-768x583.png 768w, \/wp-content\/uploads\/2022\/03\/churncorrelation-600x455.png 600w\" sizes=\"(max-width: 882px) 100vw, 882px\" \/><\/a><\/p>\n<p>Let us analyze the results of this correlation graph. From right to left, we observe churn attribute, that as expected, has a correlation of 1 with itself. Other attributes that have a high correlation with churn are contracts, online security, and technical support. In another hand, from left to right, two-year contracts and tenure, as the customers are retained, have a negative correlation with churn.<\/p>\n<p>Now, depending on the interest of our study, we can plot various variables in our dataset, using the <code>matplotlib.ticker<\/code> library. For demonstration purposes, we would like to plot the gender variable in our dataset and see the percentage of men and women customers. This is achieved with the following code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">colors = ['#000080','#FF0000']\nax = (telecom_customers['gender'].value_counts()*100.0 \/len(telecom_customers)).plot(kind='bar',stacked = True,rot = 0,color = colors)\n\nax.set_ylabel('Percent. Customers')\nax.set_xlabel('Gender')\nax.set_ylabel('Percent. Customers')\nax.set_title('Gender')\n\ntotals = []\n\nfor i in ax.patches:\n    totals.append(i.get_width())\n\ntotal = sum(totals)\n\nfor i in ax.patches:\n    ax.text(i.get_x()+.15, i.get_height()-3.5, \n            str(round((i.get_height()\/total), 1))+'%',\n            fontsize=12,\n            color='white',\n           weight = 'bold')<\/code><\/pre>\n<\/div>\n<p>And outputs the following graph:<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/gender.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/gender.png\" alt=\"\" width=\"382\" height=\"278\" class=\"aligncenter size-full wp-image-28129\" srcset=\"\/wp-content\/uploads\/2022\/03\/gender.png 382w, \/wp-content\/uploads\/2022\/03\/gender-300x218.png 300w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/a><\/p>\n<p>Let us take another example, and plot our customers by senior citizenship, using the a similar code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">ax = (telecom_customers['SeniorCitizen'].value_counts()*100.0 \/len(telecom_customers))\n.plot.pie(autopct='%.1f%%', labels = ['No', 'Yes'],figsize =(5,5), fontsize = 12 )                                                                          \n \nax.set_ylabel('Senior Citizens',fontsize = 12)\nax.set_title('% of Senior Citizens', fontsize = 12)<\/code><\/pre>\n<\/div>\n<p>To obtain the following pie chart:<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/seniorCit.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/seniorCit.png\" alt=\"\" width=\"303\" height=\"302\" class=\"aligncenter size-full wp-image-28127\" srcset=\"\/wp-content\/uploads\/2022\/03\/seniorCit.png 303w, \/wp-content\/uploads\/2022\/03\/seniorCit-300x300.png 300w, \/wp-content\/uploads\/2022\/03\/seniorCit-150x150.png 150w, \/wp-content\/uploads\/2022\/03\/seniorCit-230x230.png 230w\" sizes=\"(max-width: 303px) 100vw, 303px\" \/><\/a><\/p>\n<p>Now we have our data ready, it is time to predict the churn of customers. In the next section, we describe the machine learning model used in this article to predict the churn rate.<\/p>\n<h2>Machine Learning Model<\/h2>\n<p>Before building the model, we must recall that we have already transformed all categorical variables into dummy attributes. This process will make the implementation of machine learning easier for all the attributes of the dataset, and we will not have to use multiple functions. In fact, we will be using this dummy data frame that we created in earlier sections, and we will also scale the variables to a value between 0 and 1, to be more suitable for the algorithm. These two operations are achieved with the following code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">y = dataframe_dummies['Churn'].values\nX = dataframe_dummies.drop(columns = ['Churn'])\n \nfrom sklearn.preprocessing import MinMaxScaler\nfeatures = X.columns.values\nscaler = MinMaxScaler(feature_range = (0,1))\nscaler.fit(X)\nX = pand.DataFrame(scaler.transform(X))\nX.columns = features<\/code><\/pre>\n<\/div>\n<p>In order to use the machine learning algorithm, we will have to randomly split the dataset to provide both the training and the testing data. This is achieved with the following lines of code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">from sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=101)\n<\/code><\/pre>\n<\/div>\n<p>For the purpose of this study, we will use a logistic regression model to predict the churn rate. We will begin by fitting the regression model to our training data.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">from sklearn.linear_model import LogisticRegression\nmodel = LogisticRegression()\nresult = model.fit(X_train, y_train)<\/code><\/pre>\n<\/div>\n<h1>Model Evaluation<\/h1>\n<p>At this moment, we are ready to run the model. To do that, we use the predict() function from the <code>LogisticRegression<\/code> library to make a prediction on the actual testing data. We can observe that the obtained accuracy is 80% of correctly classified instances.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">from sklearn import metrics\nfrom sklearn.metrics import classification_report, confusion_matrix  \n \nprediction_test = model.predict(X_test)\n \n# Print results & confusion matrix\nprint (metrics.accuracy_score(y_test, prediction_test))\n \nprint(confusion_matrix(y_test,prediction_test))\n<\/code><\/pre>\n<\/div>\n<p><code>0.8075829383886256<\/code><\/p>\n<p>Now, we will see how to interpret the confusion matrix:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">[1418  162]\n[ 244  286]<\/code><\/pre>\n<\/div>\n<p>We can observe from the results that 1418 and 286 were respectively the true positives and false positives, or the correctly classified instances, in this case, the likelihood of a customer to churn. The sum of these instances is 1704, which represents 80% of the total 2110 instances.<\/p>\n<h1>Conclusion<\/h1>\n<p>In this article, we have seen predicted churn in the telecommunication industry using machine learning algorithms in Python. As a database to store our data, we used GridDB.<\/p>\n<p>In case you would like to take this article a step further, you can try with other classification algorithms that can be executed in a similar way to the example provided in this article. For more details, visit the <a href=\"https:\/\/www.kaggle.com\/bandiatindra\/telecom-churn-prediction\/notebook\">open source notebook.<\/a><\/p>\n<h1>References<\/h1>\n<ul>\n<li>https:\/\/www.heavy.ai\/blog\/strategies-for-reducing-churn-rate-in-the-telecom-industry<\/li>\n<li>https:\/\/www.kaggle.com\/bandiatindra\/telecom-churn-prediction\/notebook<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then defined as the rate by which a company loses customers in a given time frame. For example, a churn rate of 15%\/year means that a company loses 15% of [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":28261,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-12T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-30T21:06:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1277\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Telecom Churn Prediction using Machine Learning, Python, and GridDB\",\"datePublished\":\"2022-05-12T07:00:00+00:00\",\"dateModified\":\"2026-03-30T21:06:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\"},\"wordCount\":1414,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\",\"name\":\"Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg\",\"datePublished\":\"2022-05-12T07:00:00+00:00\",\"dateModified\":\"2026-03-30T21:06:55+00:00\",\"description\":\"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg\",\"width\":1920,\"height\":1277},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT","description":"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then","og_url":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-05-12T07:00:00+00:00","article_modified_time":"2026-03-30T21:06:55+00:00","og_image":[{"width":1920,"height":1277,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"griddb-admin","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Telecom Churn Prediction using Machine Learning, Python, and GridDB","datePublished":"2022-05-12T07:00:00+00:00","dateModified":"2026-03-30T21:06:55+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/"},"wordCount":1414,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/","url":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/","name":"Telecom Churn Prediction using Machine Learning, Python, and GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg","datePublished":"2022-05-12T07:00:00+00:00","dateModified":"2026-03-30T21:06:55+00:00","description":"Customer churn is a key business concept that determines the number of customers that stop doing business with a specific company. The churn rate is then","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/telecom-churn-prediction-using-machine-learning-python-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg","contentUrl":"\/wp-content\/uploads\/2022\/03\/air-broadcast_1920x1277.jpeg","width":1920,"height":1277},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46696"}],"version-history":[{"count":2,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46696\/revisions"}],"predecessor-version":[{"id":55152,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46696\/revisions\/55152"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/28261"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}