In this article I am planning to give an answer of the following two questions: What is a closure? A closure is a function, inheriting variables from enclosing environment. Operationally, a closure is a record storing a function together with…

Python code examples

In 2013 and 2014 (wow, already 7 years ago!) I wrote two articles about linear regression with Excel. Now, I am getting more and more interested in Python, thus I guess it would be interesting to remake the article into…

Tagged with: linear regression, plotting, plotting both predicted and real values, prediction, Python

Working with python, pandas and dataframes is quite challenging even for experienced Excel & VBA developer, as I love to consider myself for one. Thus, today I was fighting for quite some time to add new columns to a dataframe,…

Tagged with: adding columns, based on columns, based on rows, computating column, dataframe, offset, Python, shift, shifting column

About 4 years ago, I wrote an article about prime numbers in Excel and their visualisation with VBA – vba-function-in-excel-to-check-prime-numbers. Pretty much, it displays the prime numbers in a 10 x N matrix, starting from 1 and finishing at N:…

Tagged with: align, bg_color, center, Excel, first column and first row of Excel is with index 0, font_color, format, matrix, prime numbers, Python, xlsxwriter

After reading the database to python from the previous post here, it is time to do the ADD data to the database. Our database is created like this:

1 2 3 4 5 |
CREATE TABLE "drummers" ( "Id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "Name" TEXT, "Band" TEXT ) |

The database has autoincremented primary key, thus we do not need…

Top