The Scenario I want to analyze data for New England Patriots over the past 10 seasons. The data files are downloaded as a file by year. So, for 2010 through 2019 NFL season, I have 10 separate data files. I need to combine them all into a single file so I can do an all-up […]
Tag: programming
Working with clipboard, dataframe, and data files
In this blog, I’ll share tips on: How to read data into a dataframe, create a subset of dataset in memory Read/write curated subset from/to clipboard as Text/CSV or XLSX Create new data files CSV/Excel The Scenario I have a large dataset. Checking its shape via Python, I see it has 18241 records with 9 […]
Using Python, SQL, and Excel together for data shaping & analysis
There are times when I’d like to take a peek at my data CSV or XLS/X even before firing up Excel. Usually when the dataset is large and I want to quickly inspect it and modify it for my needs before even putting Excel to work. For that purpose, Python is very useful. Add its […]
Generating, plotting trajectory and…gamification (Excel)
Reminiscing the old tank game, I wanted to re-create a low-weight, low-code option of that simulation. The game depended on a canon (projectile) shot at your selected speed and angle to hit an enemy tank. The foundational formula is used in missile launch, sports, and many (you guessed it) military applications. Here, using the same […]
Phone number formatting tips (Excel and Python)
For most people working with data for a significant amount of time, formatting raw data from different sources are both a reality and a pain. Today, I show different ways to format an un-formatted string that contains phone numbers using Python, and Excel. Our task is to format it (either for human-reporting, or consumption by […]
Searching online (Google) with Python
In this blog, I demonstrate how to run a Google query from a Python app extremely easily. The harder part is just the set up and knowing what to install. So, let’s start with the set up details: You’ll need to install the following packages IN ORDER: 1) beautifulsoup4 2) google NOTE: The package to […]
The 3n+1 Problem & More! (Part 2)
This is a continuation (part 2) of my blog titled The 3n+1 Problem & More! I recommend you read that first to get the context, or it’ll be really boring or at least confusing 🙂 In the previous blog we generated a sequence of numbers starting from ANY number and converging to 1…always! I also […]
The Dictionary Challenge-Part 2
This is a continuation of the Dictionary Challenge previously completed. To follow along, you should read that post here. So, we have already downloaded a free Webster dictionary but completely unformatted and unstructured. So, we created a new file in a more structured way that our program can process. The code is in the previous […]
The Dictionary Challenge-Part 1
Ok, today I’m inflicting a self-imposed challenge…here it is: Get an English dictionary. Then find how many words start with vowels. How many words are there starting with “odd” letters, which I’ll set as: Z, Q, J. Then find the longest word in that dictionary. (Say, we’re going to make a word guessing game) All […]
Let’s Roll! — 2 dice…and find the probability and chart it (Python)
What numbers will you get if you roll 2 dice? How about we find out by writing a program? Can we then chart the results over as many rolls as we want? And then interactively play with the chart? Asking a lot! But yes, I will do ALL of the above here. Better yet, why […]