Python string contains height in metric system. What could go wrong?

Photo by Markus Spiske on Unsplash

Let’s start by first answering the question in the subtitle. Many things could go wrong! Let me quickly take you through a few scenarios using an example.

Let’s say we want to store the following line as a Python string — “Minimum height of 5'8” and minimum weight of 65 kgs”. It does sound like a pretty normal statement in English. A statement you would use to describe someone or describe some requirements you may have. But here’s the catch. The height is not being described in centimeters or meters. We’re using the imperial system, which uses feets and inches…


I read Derek Silver’s Hell Yeah or No, what’s worth doing today.

It’s a short read where the author introduces very powerful ideas that could expand into books on their own.

Here are my 5 key takeaways from the book:

  1. Actions, not words, reveal our real values

Derek says that we often lie to ourselves. Some of us keep saying to ourselves that we are entrepreneurs, creators, developers etc., but if we were truly any of that, we would have acted towards it. As the old saying goes, ‘Actions speak louder than words’. Want to become someone or achieve something…


Do you often forget how to read CSV in Python/R?

Representative Photo. (Photo by Kelly Sikkema)

Brandon Rohrer, Principal Data Scientist at iRobot, recently tweeted that every time he had to read or write data, he had to Google it up!

Sounds familiar?

As a beginner, I used to always think that great programmers know absolutely everything there is to know about programming. They have everything in their head and they don’t need to lookup anything.

But the reality is far from it!

In fact, it’s quite the opposite from whatever I’ve been reading. The more experienced you are, the lesser it is that you keep…


Hello World! It’s been a very very long time since my last post. I’ve been trying to find time, but somehow haven’t been able to. Anyway, now that I’m back, let me jump right into the topic!

Over the past many months, I’ve received hundreds of messages from people asking me how they could get started with Data Science. Now, I’ve been trying to reply to many of these messages, but increasingly I’ve been finding it difficult to keep up. …


I was recently asked the difference between Big Data, Hadoop and Machine Learning.

Let’s say there’s a dam to store water.

Source: https://images.financialexpress.com/2018/10/dam.jpg

And there are lots of pipes connected which deliver water to homes.

In the summer months, there’s less rain and there’s little water in the dam. Water flows without any issues.

This is small data.

In the rainy season, there are torrential rains and now the dam has exceeded it’s capacity.

There’s so much water that it’s overflowing everywhere.

Your pipes are under tremendous stress. They can no longer hold fort and they start leaking.

This is big data…


Representational picture of a conversation between a rapper and a cashier. (Image Source: https://jobdescriptionswiki.com/wp-content/uploads/2018/03/McDonalds-cashier.jpg)

Part 1

  • A rapper enters a fast food restaurant*
  • Rapper: I want a burger yo!
  • Cashier: Which one would you like?
  • Rapper: Chicken. Cashier: Alright.
  • Would you like to have any drinks?
  • Rapper: Yeah. Get me a coke without ice cubes. Also could you add 1 big chicken burger, 1 small beef burger, 2 mini fries….
  • Cashier: Wait a minute! I’m out of RAM!
  • Rapper: What do you mean?
  • Cashier: When you go too fast and say a lot of things, I cannot process it. It’s just too much data to process. Computers also face the same problem.
  • Rapper: What, really?
  • Cashier…


This Independence day was different. I was back home. And I had developed skills that I didn’t have earlier. So I thought of combining Independence day celebrations with my new found data skills.

Also, I had nothing to do on a holiday evening.

I built a system that recognized me and the father of our nation, Mahatma Gandhi and after recognizing, spoke a few lines about us. That’s about it. I know, it’s not something very fancy, but in the limited time of a couple of hours, I think it is a decent project to do.

Let me divide the…


When you’re interviewing for any position, you are essentially providing data points to the interviewer.

The interviewer has already built a model that classifies you and other candidates into either selected class or rejected class. (In some cases, a ‘maybe’ class exists).

In other words, your task is to provide enough data points that will put you on the right side of the classification boundary, i.e. get you selected.

Now, different interviewers have been trained on different data points. As a result, the models developed by the interviewers in their heads may vary.

So don’t fret if the data points…


Sorry for the long title but I wanted to make sure that the problem statement is clearly represented in the title. I tried searching for a solution to this problem online on stackoverflow and other forums but couldn’t find exactly what I wanted. Therefore I thought I’d write a short blog post about it so that it can help me and anyone else who’d face such a task in the future.

I was recently doing some data transformations and faced a situation where I had to select multiple columns from two different dataframes and check for certain conditions in both…


I have been working with data and machine learning since more than year. Yet I hadn’t had the chance to build a prototype of a web-based interface to a data table, as none of my projects required anything like that. With elections for the 2018 Karnataka Assembly looming around the corner, I thought it would be interesting to build a prototype using Karnataka’s assembly election results from 2013 (Assembly elections are held once every 5 years).

To build the prototype, I looked around for something that would require minimal time and yet give me a good visualization. I didn’t want…

Imaad Mohamed Khan

Writing at the intersection of data and the world.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store