Call today 0845 643 6463

# Python

• ## Part 1: Web Scraping and Natural Language Processing- Web Scraping

In this multi blog series I will go through what web scraping is, what Natural Language processing is as a general term as well as diving into some constituent techniques we are interested in; key word extraction, sentiment analysis and its derivative opinion mining. The last few parts will then go through a coded example of scraping the popular review site Trust pilot for reviews of the popular supermarket chain ‘Lidl’. We will then…

• ## Creating a quadratic solver in Python

In this blog post, I will be showing you how to create a python function that will solve any quadratic equation. Firstly, what is a quadratic equation? A quadratic is an algebraic equation that can be arranged as ax2 + bx + c = 0 where a, b, c are known and a ≠ 0. If a = 0 then the equation becomes linear as there isn’t a x2 term. Secondly, how to solve this equation? There are different ways to solves quadratic equations including: By…

• ## Pandas; Why Use It And How To Do So!

Introduction Hi and welcome to what will be my first frog blog! I’m Lewis Prince, a new addition to the Purple Frog team who has come on board as a Machine Learning Developer. My skill set resides mainly in Data Science and Statistics, and using Python and R to apply these. Therefore my blogs will be primarily on hints and tips on performing Data Science and Statistics through the medium of Python (and possibly R). I thought I would start…

• ## How to create the Fibonacci Sequence in Python

This blog post will go through how to create the famous Fibonacci sequence in Python. Each number in the Fibonacci sequence is the sum of the previous two terms. The sequence starts: 0, 1, 1, 2, 3, 5, 8, 13, … and carries on infinitely. The Python code I used is: The first two terms are entered into our list, then we specify the number of terms wanted in our sequence. Next, we loop through from 2 to the number of terms we wanted appending…

• ## Join 2 Python lists together using nested loops

In this blog post I will show you how to join two 2D Python lists together. The code is in the screenshot below. Lines 1 – 2 are two lists that are going to be joined, line 3 is an empty list where the output will be appended to. Lines 4 – 5 are two loops (one nested inside the other) which cycle through the records in both lists, line 6 checks whether the first items (index 0) in the two records from each list that are currently i…