Python tutorials

Python’s ChainMap: Manage Multiple Contexts Effectively

Sometimes when you’re working with several different dictionaries, you need to group and manage them as a single one. In other situations, you can have multiple dictionaries representing different scopes or contexts and need to handle them as a single dictionary that allows you to access the underlying data following a given order or priority. In those cases, you can take advantage of Python’s ChainMap from the collections module. ChainMap groups multiple dictionaries and mappings in a single, updatable view […]

Read more

Why must text data be pre-processed ?

This article was published as a part of the Data Science Blogathon Introduction Language is a structured medium we humans use to communicate with each other. Language can be in the form of speech or text. “Blah blah”, “Meh”, “zzzz…” Yup, we can understand these words. But the question is, “Can computers understand these?” Nop, machines can’t understandthese. In fact, machines can’t understand any text data at all, be it the word “blah” or the word “machine”. They only understand numbers. […]

Read more

Bag-of-words vs TFIDF vectorization –A Hands-on Tutorial

This article was published as a part of the Data Science Blogathon Whenever we apply any algorithm to textual data, we need to convert the text to a numeric form. Hence, there arises a need for some pre-processing techniques that can convert our text to numbers. Both bag-of-words (BOW) and TFIDF are pre-processing techniques that can generate a numeric form from an input text. Bag-of-Words: The bag-of-words model converts text into fixed-length vectors by counting how many times each word appears. […]

Read more

Spam Detection – An application of Deep Learning

This article was published as a part of the Data Science Blogathon What each big tech company wants is the Security and Safety of its customers. By detecting spam alerts in emails and messages, they want to secure their network and enhance the trust of their customers. The official messaging app of Apple and the official chatting app of Google i.e Gmail is unbeatable examples of such applications where the process of spam detection and filtering works well to protect users […]

Read more

Saving memory with Pandas 1.3’s new string dtype

When you’re loading many strings into Pandas, you’re going to use a lot of memory. If you have only a limited number of strings, you can save memory with categoricals, but that’s only helpful in a limited number of situations. With Pandas 1.3, there’s a new option that can save memory on large number of strings as well, simply by changing to a new column type. Let’s see how. Pandas’ different string dtypes Every pandas.Series, and every column in a […]

Read more

Python and REST APIs: Interacting With Web Services

In this section, you’ll look at three popular frameworks for building REST APIs in Python. Each framework has pros and cons, so you’ll have to evaluate which works best for your needs. To this end, in the next sections, you’ll look at a REST API in each framework. All the examples will be for a similar API that manages a collection of countries. The fields name, capital, and area store data about a specific country somewhere in the world. Most […]

Read more

The Pandas DataFrame: Working With Data Efficiently

The Pandas DataFrame is a structure that contains two-dimensional data and its corresponding labels. DataFrames are widely used in data science, machine learning, scientific computing, and many other data-intensive fields. DataFrames are similar to SQL tables or the spreadsheets that you work with in Excel or Calc. In many cases, DataFrames are faster, easier to use, and more powerful than tables or spreadsheets because they’re an integral part of the Python and NumPy ecosystems. In this course, you’ll learn: What […]

Read more

Getting Started with Natural Language Processing using Python

This article was published as a part of the Data Science Blogathon Why NLP? Natural Language Processing has always been a key tenet of Artificial Intelligence (AI). With the increase in the adoption of AI, systems to automate sophisticated tasks are being built. Some of these examples are described below. Diagnosing rare form of cancer –  At the University of Tokyo’s Institute of Medical Science, doctors used artificial intelligence to successfully diagnose a rare type of leukemia. The doctors used an AI […]

Read more

Python’s collections: A Buffet of Specialized Data Types

Python’s collections module provides a rich set of specialized container data types carefully designed to approach specific programming problems in a Pythonic and efficient way. The module also provides wrapper classes that make it safer to create custom classes that behave similar to the built-in types dict, list, and str. Learning about the data types and classes in collections will allow you to grow your programming tool kit with a valuable set of reliable and efficient tools. In this tutorial, […]

Read more

Your First Steps With Django: Set Up a Django Project

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. In this tutorial we’ll be answering the question “How do I setup a Django (1.5, 1.6, 1.7, or 1.8) project from scratch?” In other words, you’ll learn how to install Django and how to set up your Django project structure. Here’s how you can make the most of this tutorial: Read over the Introduction and Setup sections. Then choose your poison – Django 1.5, 1.6, […]

Read more
1 118 119 120 121 122 191