Tag Archive: Python

  • Part 2: Using the Companies House API

    Part 2: Using the companies house API, by Callum

    Part 2: Using the Companies House API Welcome back following part 1… Getting a list of companies via Python – Advanced Filtering. This example will look at the transport sector, leveraging the SIC codes in companies house. This can be altered accordingly to suit the business nature you are looking for. The libraries allows you to do more with Python, in this example that will included API calls, referencing the current date time and…

    » Read more
  • Supporting Future Talent Through Work Experience

    Supporting Future Talent Through Work Experience

    We recently welcomed Christian to the Purple Frog team for a week of work experience, giving him a hands-on insight into life in a data and AI consultancy. During the week, Christian spent time across the business, joining meetings and working closely with team members to understand how different roles come together to deliver for clients. He also completed a Power BI project, presenting his work at the end of the week, and was introduced to the…

    » Read more
  • Python Dictionaries – What do I need to know?

    Python Dictionaries – What do I need to know?

    When you’re learning Python, dictionaries are one of the most important data structures you’ll encounter. Unlike lists (see blog post) which store items by position, dictionaries store data as key-value pairs, making them the natural choice whenever you need to look something up by name rather than by index. In this post, we’ll cover everything you need to know about Python dictionaries: what they are, how they work, and how to…

    » Read more
  • Part 1: Using the Companies House API

    : A person wearing a Purple Frog-branded polo shirt stands with arms crossed in front of a modern curved glass building. The background features a purple geometric design with hexagons and circular tech-style graphics. Text on the right reads: ‘Part 1: Using the companies house API.’

    The .gov website hosts companies house and the companies house API. This is a comprehensive list of businesses across the UK, new and old, big and small, and their filings and info. You can interact with this information via code such as Python. The following blog post series will show you how to perform an advanced search of companies – using multiple different filters to get specific businesses – and then looping through these results to…

    » Read more
  • Why DuckDB Is the Data Engineer’s New Secret Weapon

          Most databases need a server. DuckDB doesn’t. It’s a zero‑config, in‑process OLAP database you can run directly using Python. It’s fast, SQL‑friendly, and speaks Parquet like a native language — no clusters, no heavyweight setup, no waiting for provisioning. Think of DuckDB as SQLite for analytics — but faster, more column‑aware, and built for modern data engineering.   What Makes DuckDB Special DuckDB…

    » Read more
  • Python Lists – What do I need to know?

    Python Lists – What Do I Need to Know?

    When you’re learning Python, lists are one of the first data structures you’ll encounter. They’re simple, powerful, and flexible. But what should you really know to use them effectively? In this post, we’ll cover everything you need to know about Python lists: what they are, how they work, and how to use them efficiently. What is a Python List? A list is a mutable, ordered, heterogeneous collection of items. Think of it as a…

    » Read more
  • How to Run T-SQL in Microsoft Fabric Python Notebooks

    Here at Purple Frog Systems, I’ve been experimenting with pure Python Notebooks rather than PySpark Notebooks for small to medium datasets, due to their super quick start up time and reduced CU consumption for customers with smaller F-SKUs. https://learn.microsoft.com/en-us/fabric/data-engineering/fabric-notebook-selection-guide When scrolling through LinkedIn I came across a Microsoft Blog which allows you to combine T-SQL and Python within…

    » Read more
  • How to combine images using Python

    How to combine images using Python

    In this blog post, I will be showing how to combine images using Python. I used this code in a for loop to combine hundreds of different images for one of our clients. These are the two images that we will combine. Pillow is a PIL fork, install Pillow using pip and import PIL into the Python script. Next, set the two variables. These images are saved in the same folder as the script, therefore only the filenames are required to reference them.…

    » Read more
  • PySpark Problems: Using Map() gives the error “TypeError: unsupported operand type(s) for /: ‘builtin_function_or_method’ and ‘float’ “

    This error was something I saw at the same time as the error I discussed in my previous blogpost (here), where we are seeing conflicting data types when trying to divide each value of a count of values by the number of days in 3 months (approximately) to get a frequency value over 3 months. I did show the code to fix the error we will discuss in the previous blog post, but I will go into more detail here. The code (without the line that fixes…

    » Read more
  • How to add text to images using Python

    In this blog post, I will be showing how to add text to an image in Python. I used this code to generate hundreds of images with different text for one of our clients. The full script is downloadable at the bottom with the required extras. Firstly, install the Python library Pillow. Pillow is a PIL fork, install Pillow using pip and import PIL into the Python script.           In Python, select the image that you would…

    » Read more