Python

The Sigmoid Activation Function - Python Implementation — step-by-step Python tutorial on Progressive Robot

The Sigmoid Activation Function – Python Implementation

URL: https://www.progressiverobot.com/sigmoid-activation-function-python/ In this tutorial, we will learn about the sigmoid activation function. The sigmoid function always returns an output between 0 and 1. After this tutorial you will know: What is an activation function? How to implement the sigmoid function in python? How to plot the sigmoid function in python? Where do we use […]

Read more
Python typing module - Use type checkers effectively — step-by-step Python tutorial on Progressive Robot

Python typing module – Use type checkers effectively

URL: https://www.progressiverobot.com/python-typing-module/ Introduced since Python 3.5, Python's typing [module](/community/tutorials/python-modules) attempts to provide a way of hinting types to help static type checkers and linters accurately predict errors. Due to Python having to determine the type of objects during run-time, it sometimes gets very hard for developers to find out what exactly is going on in […]

Read more
Pandas melt() and unmelt using pivot() function — step-by-step Python tutorial on Progressive Robot

Pandas melt() and unmelt using pivot() function

URL: https://www.progressiverobot.com/pandas-melt-unmelt-pivot-function/ Pandas melt() function is used to change the DataFrame format from wide to long. It's used to create a specific format of the DataFrame object where one or more columns work as identifiers. All the remaining columns are treated as values and unpivoted to the row axis and only two columns – variable […]

Read more
How To Query Tables and Paginate Data in Flask-SQLAlchemy — step-by-step Python tutorial on Progressive Robot

How To Query Tables and Paginate Data in Flask-SQLAlchemy

In this tutorial, you’ll use Flask and Flask-SQLAlchemy to create an employee management system with a database that has a table for employees. You’ll use the Flask shell to query a table, and get table records based on a column value. You’ll retrieve records on certain conditions. You’ll order the results by a column value, and count and limit query results. Finally, you’ll use pagination to display a certain number of records per page in a web application.

Read more
How To Obtain a pandas DataFrame from an Unordered API Endpoint — step-by-step Python tutorial on Progressive Robot

How To Obtain a pandas DataFrame from an Unordered API Endpoint

A DataFrame is a two-dimensional data structure with data presented in rows and columns. Using Python, one common method is to convert data from CSV, Excel, or API endpoints into a Pandas DataFrame. However, some API endpoints do not represent column names and their values in a clear context, which can present a challenge for converting the data into a DataFrame. In this tutorial, you will obtain data from an unordered endpoint and present it in a suitable format to Pandas DataFrame.

Read more
Python OrderedDict — step-by-step Python tutorial on Progressive Robot

Python OrderedDict

URL: https://www.progressiverobot.com/python-ordereddict/ Python OrderedDict is a [dict](/community/tutorials/python-dictionary) subclass that maintains the items insertion order. When we iterate over an OrderedDict, items are returned in the order they were inserted. A regular dictionary doesn't track the insertion order. So when iterating over it, items are returned in an arbitrary order. When we want to make sure […]

Read more
numpy.ones() in Python — step-by-step Python tutorial on Progressive Robot

numpy.ones() in Python

URL: https://www.progressiverobot.com/numpy-ones-in-python/ Python numpy.ones() function returns a new array of given shape and data type, where the element's value is set to 1. This function is very similar to [numpy zeros()](/community/tutorials/numpy-zeros-in-python) function. numpy.ones() function arguments The numpy.ones() function syntax is: ones(shape, dtype=None, order='C') The shape is an int or tuple of ints to define the […]

Read more
CHAT