Category Archives for "Python"

List Comprehension in Python

What is list Comprehension? This is a method in Python that It allows you to create a new list by transforming and filtering elements from an existing list. The beauty of this is its done in a single line of code. We can use a list and the word iterable interchanged due to a list […]

How to Find Outliers in Python

Find outlier is essential for a host of reasons from not skewing your averages to ensuring that machine learning algorithms function properly. In this tutorial, I am going show you several ways in which you can remove outliers from your data. We explore a few traditional methods such as Z-score and IQR. In addition, we […]

Calculate Customer Lifetime Value with Python

CLV is a crucial measure for firms to comprehend in order to maximize their marketing and sales activities. CLV is a forecast of the net profit attributable to a customer’s entire future relationship. This article will explain how to compute CLV in Python. Let’s take a look at the formula to get your mind in […]

How to Use Facebook Prophet Model

Facebook made FB Prophet, a library for Python and R that lets you make predictions based on time series. There are a lot benefits of using this model and some negative aspects to using this model. So lets explore the pros and cons. Also we will also go through the basic coding of the model. […]

How to Create Dataset with Python Faker

One of the greatest ways to learn and practice your analysis is using a real-world dataset. However, there is a time when its better to create your own dataset. In this case, you can specify some of parameters that fit your desires. We can use the Faker library to create a dataset in any language. […]

Data for Bike-Sharing Analysis

You can find the bike share analysis here Bike Share Data CSV If you want to follow along with the code, you can get it here:

How to Reverse a String in Python

If you are wondering how to reverse a string in Python, this can easily be done with slice notation. However, I will show you a few quick ways to reverse Python strings. I will list these in order difficulty. Two Main Points Reverse Python Strings with Slice Notation When slicing a string, you should think […]

How to Use and Tune XGBOOST

Why XGBoost is Awesome? One of the most implemented and widely used classifiers is XGBoost, and there are reasons for it XGBoost has an ability to implement both Classification and Regression models using the same core algorithm. It is one of the most used algorithms in Kaggle and daily use case applications. First of all, […]

How to Create a Function in Python

A function is a reusable block of code that performs a certain functionality. Functions are fundamental building blocks of a programming language as they introduce modularity and reusability in the code.  In this article, we will learn how to create and call a function in python. We will also go through the important concepts like […]

How to Create a Dictionary in Python ( 3 Ways )

The dictionary (short form dict) is a fundamental data structure in Python. It uses key-value pairs to store the data in an efficient manner. Creating dictionary is a simple task in python however, we can use different ways to create a dictionary that fits our real data.  In this article, we will learn three methods […]