With Selection, Slicing, Indexing and Filtering

Photo by Hans-Peter Gauster on Unsplash

In part 1 and part 2, we’ve learned how to inspect, describe and summarize a Pandas DataFrame. Today, we’ll learn how to extract a subset of a Pandas DataFrame. This is very useful because we often want to perform operations on subsets of our data. There are many different ways of subsetting a Pandas DataFrame. You may need to select specific columns with all rows. Sometimes, you want to select specific rows with all columns or select rows and columns that meet a specific criterion, etc.

All different ways of subsetting can be divided into 4 categories: Selection, Slicing, Indexing…


Reduce the size of your dataset while keeping as much of the variation as possible

Photo by Nika Benedictova on Unsplash

In both Statistics and Machine Learning, the number of attributes, features or input variables of a dataset is referred to as its dimensionality. For example, let’s take a very simple dataset containing 2 attributes called Height and Weight. This is a 2-dimensional dataset and any observation of this dataset can be plotted in a 2D plot.


Choose the Right Laptop for Data Science and Machine Learning

Photo by XPS on Unsplash

If you’re learning Data Science and Machine Learning, you definitely need a laptop. This is because you need to write and run your own code to get hands-on experience. When you also consider portability, the laptop is the best option instead of a desktop.

A traditional laptop may not be perfect for your data science and machine learning tasks. You need to consider laptop specifications carefully to choose the right laptop. If you’re looking to buy a laptop for data science and machine learning tasks, this post is for you! …


I’ve figured out 6 reasons for it

Photo by Mauro Gigli on Unsplash

Recently, I’ve published my most successful story in terms of views and earnings — 20 Necessary Requirements of a Perfect Laptop for Data Science and Machine Learning Tasks. Here are its stats.


Sharing my experience: Lists are super useful and very easy to use than I imagined

My first two lists (Screenshot by author)

“Lists” is a trending topic on the platform these days. Many writers have already shared various articles regarding “Lists”. I also read many of them. Finally, I’ve created two lists as you see in the cover image. In this post, I’ll share my experience when creating those two lists.

My First List: Dimensionality Reduction

Click on the following image to view my first list:


6 Tips for caring your eyes from harmful blue light

Photo by Daniil Kuželev on Unsplash

Laptops and other smart devices that have screens emit blue light which may be harmful to your eyes. Blue light has a short wavelength and high energy. Longer exposure to blue light can cause long-term effects to your eyes such as eye strain, eye fatigue, etc. It can also disrupt your regular sleep patterns, which is also a severe threat to your life.

As we’ve already adapted to using these smart devices, it is almost impossible to manage our day-to-day tasks without using them. This means you expose to some sort of blue light and you cannot avoid that. However…


Data Preprocessing

Make your data ready for analysis

Photo by Joshua Earle on Unsplash

Data is the most valuable asset in any machine learning or deep learning model. The quality of data directly influences the performance of your models. Most of us highly consider performing hyperparameter tuning for model optimization. In most cases, hyperparameter tuning can increase only 2–5% of the model’s performance. However, data quality issues can terminate your project right away.

Real-world data are not in the shape that you want. They are not ready for analysis. In most cases, data has missing values and outliers which is the second worse problem for data scientists, after overfitting. Categorical variables contain non-numerical values…


Make your subtitles more meaningful

Photo by Sam Moqadam on Unsplash

The title, subtitle and cover image are the main components of a story. They should be meaningful and matched each other. I spend more than 20% of the story writing time to select and match these components. A good combination of these components always invites many readers to read my contents.

I’ll take some examples of title-subtitle combinations in my previous posts and explain their meaningfulness. More emphasis will be given to the subtitle section so that you’ll learn different uses of subtitles.

Example 1


Data, Computational resources, Algorithms and Open-sourced frameworks

Photo by Matt Paul Catalano on Unsplash

Deep Learning (DL) and Machine Learning (ML) are two subsets of Artificial Intelligence (AI). ML is different from traditional programming so that its ability to learn from data without providing explicit rules. It can identify hidden patterns behind data. ML is handy for analyzing structured data. DL goes beyond ML when we consider the complexity of models. It provides an Artificial Neural Network (ANN) approach. DL is super useful for analyzing unstructured data (images, texts, voice, etc.). ML is not much suitable for these types of data.

ML and DL have been around us over the past decades. The emerging…


Sharing what I did so far

Photo by Markus Spiske on Unsplash

Every morning, I view my Medium Partner Program dashboard. On June 2, I saw the following message on my dashboard.

Rukshan Pramoditha

Data Analyst with Python || Bring data into actionable insights

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