Python tutorials

6 Exciting Open Source Data Science Projects you Should Start Working on Today

Overview Here are six open-source data science projects to enhance your skillset These projects cover a diverse set of domains, from computer vision to natural language processing (NLP), among others Pick your favorite open-source data science project(s) and get coding!   Introduction I recently helped out in a round of interviews for an open data scientist position. As you can imagine, there were candidates from all kinds of backgrounds – software engineering, learning and development, finance, marketing, etc. What stood […]

Read more

spaCy Tutorial to Learn and Master Natural Language Processing (NLP)

Introduction spaCy is my go-to library for Natural Language Processing (NLP) tasks. I’d venture to say that’s the case for the majority of NLP experts out there! Among the plethora of NLP libraries these days, spaCy really does stand out on its own. If you’ve used spaCy for NLP, you’ll know exactly what I’m talking about. And if you’re new to the power of spaCy, you’re about to be enthralled by how multi-functional and flexible this library is. The factors […]

Read more

NLP Applications in Support Call Centers

This article was published as a part of the Data Science Blogathon. Introduction This article is in continuation of my previous article on using Machine learning in Support environments. I shared my views on, how using simple python code we can enrich our call centers/support division activities in our own organization or customer organization. In that article, I shared an insight into what and how we can make a difference to the current environment using ML in giving better service […]

Read more

What Does if __name__ == “__main__”: Do in Python?

Introduction It’s common to see if __name__ == “__main__” in Python scripts we find online, or one of the many we write ourselves. Why do we use that if-statement when running our Python programs? In this article, we explain the mechanics behind its usage, the advantages, and where it can be used. The __name__ Attribute and the __main__ Scope The __name__ attribute comes by default as one of the names in the current local scope. The Python interpreter automatically adds […]

Read more

Seaborn Scatter Plot – Tutorial and Examples

Introduction Seaborn is one of the most widely used data visualization libraries in Python, as an extension to Matplotlib. It offers a simple, intuitive, yet highly customizable API for data visualization. In this tutorial, we’ll take a look at how to plot a scatter plot in Seaborn. We’ll cover simple scatter plots, multiple scatter plots with FacetGrid as well as 3D scatter plots. Import Data We’ll use the World Happiness dataset, and compare the Happiness Score against varying features to […]

Read more

How to Set Axis Range (xlim, ylim) in Matplotlib

Introduction Matplotlib is one of the most widely used data visualization libraries in Python. Much of Matplotlib’s popularity comes from its customization options – you can tweak just about any element from its hierarchy of objects. In this tutorial, we’ll take a look at how to set the axis range (xlim, ylim) in Matplotlib, to truncate or expand the view to specific limits. Creating a Plot Let’s first create a simple plot: import matplotlib.pyplot as plt import numpy as np […]

Read more

Sentiment Analysis in Python With TextBlob

Introduction State-of-the-art technologies in NLP allow us to analyze natural languages on different layers: from simple segmentation of textual information to more sophisticated methods of sentiment categorizations. However, it does not inevitably mean that you should be highly advanced in programming to implement high-level tasks such as sentiment analysis in Python. Sentiment Analysis The algorithms of sentiment analysis mostly focus on defining opinions, attitudes, and even emoticons in a corpus of texts. The range of established sentiments significantly varies from […]

Read more

Python: Check Index of an Item in a List

Introduction Lists are useful in different ways compared to other datatypes because of how versatile they are. In this article we’ll take a look at one of the most common operations with lists – finding the index of an element. We will take a look at different scenarios of finding an element, i.e. finding the first, last, and all occurrences of an element. As well as what happens when the element we’re looking for doesn’t exist. Using the index() Function […]

Read more

How to Iterate over Rows in a Pandas DataFrame

Introduction Pandas is an immensely popular data manipulation framework for Python. In a lot of cases, you might want to iterate over data – either to print it out, or perform some operations on it. In this tutorial, we’ll take a look at how to iterate over rows in a Pandas DataFrame. If you’re new to Pandas, you can read our beginner’s tutorial. Once you’re familiar, let’s look at the three main ways to iterate over DataFrame: items() iterrows() itertuples() […]

Read more

Matplotlib Scatter Plot – Tutorial and Examples

Introduction Matplotlib is one of the most widely used data visualization libraries in Python. From simple to complex visualizations, it’s the go-to library for most. In this tutorial, we’ll take a look at how to plot a scatter plot in Matplotlib. Import Data We’ll be using the Ames Housing dataset and visualizing correlations between features from it. Let’s import Pandas and load in the dataset: import pandas as pd df = pd.read_csv(‘AmesHousing.csv’) Plot a Scatter Plot in Matplotlib Now, with […]

Read more
1 128 129 130 131 132 166