Planet Python RSS
214 subscribers
17K links
Unofficial Planet Python RSS feed from planetpython.org. Maintained by @cfinnberg
Download Telegram
Ben Cook: Filtering DataFrames with the .query() Method in Pandas

Link: https://jbencook.com/pandas-query/

Pandas provides a .query() method on DataFrame's with a convenient string syntax for filtering DataFrames. This post describes the method and gives simple usage examples.
The post Filtering DataFrames
Ben Cook: Binary Cross Entropy Explained

Link: https://jbencook.com/binary-cross-entropy/

A simple NumPy implementation of the binary cross entropy loss function and some intuition about why it works.
The post Binary Cross Entropy Explained appeared first on jbencook.
Ben Cook: NumPy All: Understanding np.all()

Link: https://jbencook.com/numpy-all/

The np.all() function tests whether all elements in a NumPy array evaluate to true.
The post NumPy All: Understanding np.all() appeared first on jbencook.
Ben Cook: Finding the Mode of an Empirical Continuous Distribution

Link: https://jbencook.com/mode-of-continuous-distribution/

You can find the mode of an empirical continuous distribution by plotting the histogram and looking for the maximum bin.
The post Finding the Mode of an Empirical Continuous Distribution appeared firs
Ben Cook: NumPy Where: Understanding np.where()

Link: https://jbencook.com/numpy-where/

The NumPy where function is like a vectorized switch that you can use to combine two arrays.
The post NumPy Where: Understanding np.where() appeared first on jbencook.
Ben Cook: TorchVision Transforms: Image Preprocessing in PyTorch

Link: https://jbencook.com/torchvision-transforms/

TorchVision, a PyTorch computer vision package, has a great API for image pre-processing in its torchvision.transforms module. This post gives some basic usage examples, describes the API and shows yo
Ben Cook: PyTorch Tensor to NumPy Array and Back

Link: https://jbencook.com/pytorch-numpy-conversion/

You can easily convert a NumPy array to a PyTorch tensor and a PyTorch tensor to a NumPy array. This post explains how it works.
The post PyTorch Tensor to NumPy Array and Back appeared first on jbenc
Talk Python to Me: #310 AMA (Ask Me Anything) with Michael

Link: https://talkpython.fm/episodes/show/310/ama-ask-me-anything-with-michael

The tables have turned and this time I'm the guest and you all are the hosts. I get a ton of questions over email and twitter asking me about my thoughts on various trends, tools, and behind the scene
Weekly Python StackOverflow Report: (cclxix) stackoverflow python report

Link: http://python-weekly.blogspot.com/2021/04/cclxix-stackoverflow-python-report.html

These are the ten most rated questions at Stack Overflow last week.Between brackets: [question score / answers count]Build date: 2021-04-03 13:23:28 GMTPythonic way to split 3D array in smaller blocks
Python Insider: Python 3.9.4 hotfix is now available

Link: http://feedproxy.google.com/~r/PythonInsider/~3/XpiG7oXwoIw/python-394-hotfix-is-now-available.html

Python 3.9.3 was released two days ago on Friday, April 2nd. It
contains important security content listed below for reference.
Unfortunately, it also introduced an unintentional ABI incompatibility
BreadcrumbsCollector: How to implement and use Command Bus in Python with Injector?

Link: https://breadcrumbscollector.tech/how-to-implement-and-use-command-bus-in-python-with-injector/

What’s a command bus?
Command Bus is an incarnation of Mediator design pattern. It provides a way to decouple the code structure that sends a command to its receiver. It becomes handy with CQRS implem
Programiz: Python Program To Copy a File

Link: https://www.programiz.com/python-programming/examples/copy-file

In this example, you will learn to copy the content of a file to another file using Python.
John Ludhi/nbshare.io: Data Analysis With Pyspark Dataframe

Link:
https://www.nbshare.io/notebook/97969492/Data-Analysis-With-Pyspark-Dataframe/

Data Analysis With Pyspark Dataframe
Install Pyspark
!pip install pyspark
In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as
Mike Driscoll: PyDev of the Week: Ngazetungue Muheue

Link: https://www.blog.pythonlibrary.org/2021/04/05/pydev-of-the-week-ngazetungue-muheue/

This week we welcome Ngazetungue Muheue (@muheuenga) as our PyDev of the Week!
Ngazetungue Muheue
Can you tell us a little about yourself (hobbies, education, etc):
I’m Ngazetungue Muheue, a Namibian
Real Python: Python News: What's New From March 2021?

Link: https://realpython.com/python-news-march-2021/

Python is a dynamic language in more ways than one: Not only is it not a static language like C or C++, but it’s also constantly evolving. If you want to get up to speed on what happened in the world
Python⇒Speed: Loading SQL data into Pandas without running out of memory

Link: https://pythonspeed.com/articles/pandas-sql-chunking/

You have some data in a relational database, and you want to process it with Pandas.
So you use Pandas’ handy read_sql() API to get a DataFrame—and promptly run out of memory.
The problem: you’re load