Python for Beginners: Pandas Apply Function to Dataframe or Series
The pandas apply() or applymap() method is used to apply a function to values in a dataframe or a series. In this article, we will discuss the syntax and use of the pandas apply function in Python....
View ArticleReal Python: Python Folium: Create Web Maps From Your Data
If you’re working with geospatial data in Python, then you might want to quickly visualize that data on a map. Python’s Folium library gives you access to the mapping strengths of the Leaflet...
View ArticleMike Driscoll: Python Quiz 1 - Exceptionally Crazy
The Python programming language allows you to catch exceptions using the try / except construct. But what happens if you nest exception handlers and throw in a break statement too?Your mission in this...
View ArticleJohn Ludhi/nbshare.io: JSON Parse Error Syntax Error Unexpected token N In JSON
JSON Parse Error Syntax Error Unexpected token N In JSONYou will see following error if json String contains values other string or numbers. For example it can happen if you are parsing the data from...
View ArticlePython⇒Speed: Why Polars uses less memory than Pandas
Processing large amounts of data with Pandas can be difficult; it’s quite easy to run out of memory and either slow down or crash. The Polars dataframe library is a potential solution.While Polars is...
View ArticleAbhijeet Pal: Django Authentication using an Email Address
Django's built-in User model uses a username as the primary means of identifying a user. However, you may want to use an email for authentication for your web application.In this article, we will show...
View ArticleAbhijeet Pal: How To Create Custom Context Processors in Django
Django provides a convenient way to add extra data to the context of a template through context processors. These context processors can be used to display information such as the current user,...
View ArticleReal Python: The Real Python Podcast – Episode #140: Speeding Up Your...
How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine's available cores and provide built-in methods for...
View ArticleAbhijeet Pal: Creating Custom Exception in Django Rest Framework
Django Rest Framework (DRF) provides built-in exception handling that can be used to handle errors and exceptions in a RESTful API. However, in some cases, you may need to create a custom exception to...
View ArticlePython for Beginners: Pandas Applymap to a Dataframe in Python
The pandas applymap() method is used to apply a function to a dataframe element-wise. This article will discuss different ways to use the applymap method with a pandas dataframe.Table of ContentsThe...
View Articledeath and gravity: Dataclasses without type annotations
The dataclasses standard library module reduces the boilerplate of writing classes by generating special methods like __init__ and __repr__.I've noticed a small (but vocal) minority of people...
View ArticlePyBites: Resources to stay focused and positive
This content appeared as a Pybites email first. If you like it, subscribe to our friends list here to get weekly emails about Python / Developer / Mindset related topics.Let’s be honest, there is a lot...
View ArticleCodementor: Build Blazing Fast REST Api using Django + Elasticsearch + Haystack
Add a Super-Fast Search Functionality to your Website with this API. Django + Haystack + ElasticSearch
View ArticleCodementor: Dockerize an Django Based app with Postgres + Redis + ElasticSearch
Turn your Django app into an Docker Image so that you just do docker-compose up and everything starts in seconds. Docker is a wonderful tool to contai.....
View ArticleAbhijeet Pal: How to Check if a File Exists With Python
Checking if a file exists is a common task in while working with files. There are several ways to check if a file exists without raising an unwanted exception, each with its own advantages and...
View ArticleAbhijeet Pal: How to Iterate Over Rows in a Dataframe in Pandas
Pandas is a powerful library for working with data in Python, and the DataFrame is one of its most widely used data structures. One common task when working with DataFrames is to iterate over the rows...
View ArticleAbhijeet Pal: How to Revert the Last Migration in Django
In Django, migrations are used to manage changes to the database schema, such as creating or modifying tables. Sometimes, you may need to revert the last migration to undo changes that were made to the...
View ArticleAbhijeet Pal: Understanding related_name in Django Models
In Django, related_name is an attribute that can be used to specify the name of the reverse relation from the related model back to the model that defines the relation. It is used to specify the name...
View ArticleAbhijeet Pal: Capturing Query Parameters of request.get in Django
In Django, the request object contains a variety of information about the current HTTP request, including the query parameters. Query parameters are a way to pass additional information in the URL and...
View ArticleJohn Ludhi/nbshare.io: Pandas Datareader To Download Stocks Data From Google...
Pandas Datareader To Download Stocks Data From Google And Yahoo FinanceDatareader package can be used to access data from multiple sources such as yahoo and google finance...To install the package, use...
View Article