Python

How To Use Templates in a Flask Application — step-by-step Python tutorial on Progressive Robot

How To Use Templates in a Flask Application

Jinja is the templating language that Flask uses to render HTML templates. Using templates allows you to separate the business logic of your application from the presentation logic. These templates provide many features that are not available in standard HTML, such as variables, if statements, for loops, filters, and template inheritance. This helps with maintenance of HTML pages, and prevents Cross-Site Scripting attacks.

Read more
How To Write Doctests in Python — step-by-step Python tutorial on Progressive Robot

How To Write Doctests in Python

Python’s standard library comes equipped with a test framework module called `doctest`. The `doctest` module programmatically searches Python code for pieces of text within comments that look like interactive Python sessions. Then, the module executes those sessions to confirm that the code referenced by a doctest runs as expected.

Read more
How to Normalize Data Using scikit-learn in Python — step-by-step AI And Machine Learning tutorial on Progressive Robot

How to Normalize Data Using scikit-learn in Python

URL: https://www.progressiverobot.com/normalize-data-in-python/ Introduction In this article, you'll try out some different ways to normalize data in Python using scikit-learn, also known as sklearn. When you normalize data, you change the scale of the data. Data is commonly rescaled to fall between 0 and 1, because machine learning algorithms tend to perform better, or converge faster, […]

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
CHAT