Python tutorials

Defining and Calling Python Functions

A function is a self-contained block of code that encapsulates a specific task or related group of tasks. This course will show you how to define your own Python function. You’ll learn when to divide your program into separate user-defined functions and what tools you’ll need to do this. You’ll also learn the various ways to pass data into a function when calling it, which allows for different behavior from one invocation to the next. In this course, you’ll learn: […]

Read more

Python’s Counter: The Pythonic Way to Count Objects

Counting several repeated objects at once is a common problem in programming. Python offers a bunch of tools and techniques you can use to approach this problem. However, Python’s Counter from collections provides a clean, efficient, and Pythonic solution. This dictionary subclass provides efficient counting capabilities out of the box. Understanding Counter and how to use it efficiently is a convenient skill to have as a Python developer. In this tutorial, you’ll learn how to: Count several repeated objects at […]

Read more

Beautiful Soup: Build a Web Scraper With Python

The incredible amount of data on the Internet is a rich resource for any field of research or personal interest. To effectively harvest that data, you’ll need to become skilled at web scraping. The Python libraries requests and Beautiful Soup are powerful tools for the job. If you like to learn with hands-on examples and you have a basic understanding of Python and HTML, then this tutorial is for you. In this tutorial, you’ll learn how to: Use requests and […]

Read more

Beginner Projects to Learn Natural Language Processing using Python !

This article was published as a part of the Data Science Blogathon Machines understanding language fascinates me, and that I often ponder which algorithms Aristotle would have accustomed build a rhetorical analysis machine if he had the possibility. If you’re new to Data Science, getting into NLP can seem complicated, especially since there are many recent advancements within the field. it’s hard to grasp where to begin. Table of Contents 1.What can Machines Understand? 2.Project 1:Word Cloud 3.Project 2:Spam Detection 4.Project […]

Read more

Beginner’s Guide To Natural Language Processing Using SpaCy

This article was published as a part of the Data Science Blogathon Pre-requisites Basic Knowledge of Natural Language Processing Hands-on practice of Python Introduction As we know data has some kind of meaning in its position. For every moment, mostly text data is getting generated in different formats like SMS, reviews, Emails, and so on. The main purpose of this article is to understand the basic idea of NLP using the library- SpaCy. So let’s go ahead. In this article, we […]

Read more

Measuring the memory usage of a Pandas DataFrame

How much memory are your Pandas DataFrame or Series using? Pandas provides an API for measuring this information, but a variety of implementation details means the results can be confusing or misleading. Consider the following example: >>> import pandas as pd >>> series = pd.Series([“abcdefhjiklmnopqrstuvwxyz” * 10 … for i in range(1_000_000)]) >>> series.memory_usage() 8000128 >>> series.memory_usage(deep=True) 307000128 Which is correct, is memory usage 8MB or 300MB? Neither! In this special case, it’s actually 67MB, at least with the default […]

Read more

Python Inner Functions

Python allows the declaration of functions inside of other functions. Inner functions, also known as nested functions, are defined within a function. This type of function has direct access to variables and names defined in the enclosing function in Python. Inner functions have many uses, most notably as closure factories and decorator functions. In this course, you’ll learn how to: Define inner functions Use inner functions as helper functions Build function closures Use captured variables in a closure Use captured […]

Read more

Automated Spam E-mail Detection Model(Using common NLP tasks)

Hope you all are doing Good !!! Welcome to my blog! Today we are going to understand about basics of NLP with the help of the Email Spam Detection dataset. We see some common NLP tasks that one can perform easily and how one can complete an end-to-end project. Whether you know NLP or not, this guide should help you as a ready reference. For the dataset used click on the above link or here. Let’s get started, Natural Language […]

Read more

Reverse Python Lists: Beyond .reverse() and reversed()

Sometimes you need to process Python lists starting from the last element down to the first—in other words, in reverse order. In general, there are two main challenges related to working with lists in reverse: To meet the first challenge, you can use either .reverse() or a loop that swaps items by index. For the second, you can use reversed() or a slicing operation. In the next sections, you’ll learn about different ways to accomplish both in your code. Reversing […]

Read more

Amazon Product review Sentiment Analysis using BERT

This article was published as a part of the Data Science Blogathon Introduction Natural Language processing, a sub-field of machine learning has gained immense popularity in the last 5 years in both research and industrial applications due to the advancement in the field of deep learning and improvement in the computational power of hardware systems. It is a technique for computers to understand how human languages work involving the usage of computational linguistics and the computer science domain. In recent years, […]

Read more
1 116 117 118 119 120 184