Planet Python RSS
216 subscribers
16.9K links
Unofficial Planet Python RSS feed from planetpython.org. Maintained by @cfinnberg
Download Telegram
Mike Driscoll: Python Quiz 1 - Exceptionally Crazy

Link: https://www.blog.pythonlibrary.org/2023/01/11/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 thi
John Ludhi/nbshare.io: JSON Parse Error Syntax Error Unexpected token N In JSON

Link: https://www.nbshare.io/notebook/240295205/JSON-Parse-Error-Syntax-Error-Unexpected-token-N-In-JSON/







JSON Parse Error Syntax Error Unexpected token N In JSON










You will see following error if json String contains values other string or numbers. For example it can happen if you are parsi
Python⇒Speed: Why Polars uses less memory than Pandas

Link: https://pythonspeed.com/articles/polars-memory-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
Abhijeet Pal: Django Authentication using an Email Address

Link: http://djangocentral.com/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
Abhijeet Pal: How To Create Custom Context Processors in Django

Link: http://djangocentral.com/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, site-w
Real Python: The Real Python Podcast – Episode #140: Speeding Up Your DataFrames With Polars

Link: https://realpython.com/podcasts/rpp/140/

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 han
Abhijeet Pal: Creating Custom Exception in Django Rest Framework

Link: http://djangocentral.com/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
Python for Beginners: Pandas Applymap to a Dataframe in Python

Link: https://www.pythonforbeginners.com/basics/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
death and gravity: Dataclasses without type annotations

Link: https://death.andgravity.com/dataclasses

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 that:
PyBites: Resources to stay focused and positive

Link: https://pybit.es/articles/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 l
Abhijeet Pal: How to Check if a File Exists With Python

Link: http://djangocentral.com/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 disadva
Abhijeet Pal: How to Iterate Over Rows in a Dataframe in Pandas

Link: http://djangocentral.com/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
Abhijeet Pal: How to Revert the Last Migration in Django

Link: http://djangocentral.com/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 th
Abhijeet Pal: Understanding related_name in Django Models

Link: http://djangocentral.com/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
Abhijeet Pal: Capturing Query Parameters of request.get in Django

Link: http://djangocentral.com/capturing-query-parameters-of-requestget-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
John Ludhi/nbshare.io: Pandas Datareader To Download Stocks Data From Google And Yahoo Finance

Link: https://www.nbshare.io/notebook/63624410/Pandas-Datareader-To-Download-Stocks-Data-From-Google-And-Yahoo-Finance/







Pandas Datareader To Download Stocks Data From Google And Yahoo Finance










Datareader package can be used to access data from multiple sources such as yahoo and google finance...
Talk Python to Me: #398: Imaging Black Holes with Python

Link: https://talkpython.fm/episodes/show/398/imaging-black-holes-with-python

The iconic and first ever image of a black hole was recently released. It took over a decade of work and is a major achievement for astronomy and broadens our understanding of the universe for all of
John Ludhi/nbshare.io: How To Use Selenium Webdriver To Crawl Websites

Link: https://www.nbshare.io/notebook/609445379/How-To-Use-Selenium-Webdriver-To-Crawl-Websites/







How To Use Selenium Webdriver To Crawl Websites










I have Selenium 4.7.2 version installed. You can check yours using following command.








In [11]:


!pip show selenium
Daniel Roy Greenfeld: Practice Python Web Projects

Link: https://daniel.feldroy.com/posts/2023-01-practice-python-web-projects

I firmly believe that substantial improvement in any skill can only be achieved through practice. With that in mind, I have compiled a list of projects I have built over the years to practice my skill