Pieces of Py #4 Using itertools.groupby

Posted on Sun 01 September 2019 in Python • Tagged with Python, Pieces of Py, Itertools • 3 min read

During some of the exercises I did on my first round of #100DaysOfCode there was a need to group an iterable by a certain field in the data structure. I found out, that was a function called groupby in the built-in itertools library that can be used for it.

In …

Continue reading

Code Journal R2D5 100 Days of Code 2019-08-30

Posted on Fri 30 August 2019 in Python • Tagged with Python, Code Journal, Flask • 3 min read

The first couple of days of this second round of #100DaysOfCode I went through almost all the Flask tutorials in #100DaysOfWeb in Python) . They are:

  • Flask Intro
  • Calling APIs in Flask
  • Flask Login

As an extension to that I wanted to build my own app from scratch, in a way …

Continue reading

Pieces of Py #3 Clean up data from csv and save to json in a simple way with pandas

Posted on Mon 05 August 2019 in Python • Tagged with Python, Pieces of Py, Pandas, CSV, JSON • 4 min read

At work I once had to take a csv file that was exported from a large list in SharePoint, clean it up a bit and export it to a JSON format for importing in to a data layer. The csv file contained all columns in the SharePoint list, which was …

Continue reading

How I set up and work with this website

Posted on Sat 03 August 2019 in Python • Tagged with Python, Pelican, This website, CircleCI, Netlify • 6 min read

In this article I will go through how I set up this website. What my workflow looks like, updating content and configurations. Also how I set up a staging environment and a production environment with automatic builds and deployment. And how I can do almost anything from any of my …

Continue reading

Pieces of Py #2: Use a dictionary instead of multiple if-statements

Posted on Thu 01 August 2019 in Python • Tagged with Python, Pieces of Py, Dictionary, Lambda, Functools • 4 min read

One thing I learned during my first #100DaysOfCode was to use a dict instead of numerous if-statements. In my opinion it can make the code much more readable among other things. Here I'll try to make an example where this concept could fit in.

In this example we create a …

Continue reading