In my previous article I addressed some of the common queries faced by a beginner while working with various dataset. This article is the continuation of my previous article.

I’ll be continuing to demonstrate further concepts using the same dataset(UFO) as used in the first part of this article.

Image for post
Image for post

How do I sort a pandas DataFrame or a Series?


When working with tabular data, such as data stored in spreadsheets or databases, pandas is the right tool for you. pandas will help you to explore, clean and process your data. In pandas, a data table is called a DataFrame. This Blog will pose some frequently asked queries and try to answer these queries.

To demonstrate the use of pandas, I’ll be using the UFO Dataset. The data is stored as an excel file by the name of ufo.xlsx.

Image for post
Image for post

How do I read a tabular data file into pandas?

The below code demonstrates how you read a csv file into your dataframe.

import pandas as pd ''' read a dataset…


To overcome the situations of overfitting and underfitting regularization methods are used. L2 or Ridge Regularization is one such technique.

What Overfitting and Underfitting Means?

Image for post
Image for post

When the model too complex features and give high accuracy on training set and low accuracy on testing set it is said to be Overfitted.

L2 regularization is a method of adding a penalty to such a system such that variance is reduced.


In my previous article’s I addressed some of the common queries faced by a beginner while working with various datasets. This article is the continuation of my previous articles.

I’ll be continuing to demonstrate further concepts using the same dataset(UFO) as used in the first and second part of this article.

Image for post
Image for post

How do I change Categorical Features to Numerical Features?

The categorical Features needs to be changed to Numerical one’s to fit it into a any specific model. Although it is beneficial and convenient to use Label Encoder , pandas provide a method to change the Categorical Features to Numerical ones using get_dummies.

pd.get_dummies(ufo,columns=['City'])

Aarish Alam

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