Basics of Machine learning Part 2
- Technology Spiritual
- Aug 8, 2020
- 3 min read
Hello friends,
In this post, I am going to share information about below mentioned things, which will be useful for better understanding of various functions of Pandas library. Let us start:

What is Jupyter notebook
Different data types like list and dictionary
What is the Data Frames
Various operation with list and other Data types
Practical’s Examples for better understanding.
If you are a beginner than you have to understand few basic things first. Please go through with basic part from here:
What is Jupyter Notebook?
It is an open source Web application, which allows you to share and create live python code, equations, visualizations including data mining, cleaning and transformation for Data science and machine learning.
You can install this on your system using ANACONDA Environment. I have already a blog post regarding Lab setup with ANACONDA and you can find this here:
For Lab Setup: https://www.technologyspiritual.com/post/basics-steps-for-create-your-anaconda-virtual-environment-for-data-science-using-python
For test your environment by creating you first webapp with anaconda: https://www.technologyspiritual.com/post/how-to-create-a-web-app-using-streamlit-library-in-python
Once your lab has setup, than you can start with practical.
Different Data types
Here we have only three kind of data types and mentioned below:
Lists
Dictionary
Tupple
List: list is combination of elements, and these elements either a integer or string, date and time. In python we are using “[]” square brackets to introduce a list. Let us take an example of list.
Syntax of List: list name(Elements of list)

In this screenshot, I have created a list called mylist and it is containing six different elements. Do it from yourself. Later I will show you that what you do with list elements for data mining purpose.
Dictionary: Same as the List Dictionary is described by “{}” curly brackets. In the elements section we have to define keys and values to store data in dictionary. Example will explain you more.
Syntax: Dictionary_name = {“key” : “value”, “key” : “value”,……..so on} .

Hope you get it; it is very easy in python. That is why python is great language. I am not a programmer but I can feel the comfort.
Tupple: It is last one and known as “Tupple”, to define a Tupple we are using simple brackets “()”. Tupple are non-changeable, means to say that you can nit change the rows and columns here. Data will be remain same once stored in Tupple. For example Syntax is
Mytupple = (element1, element2….so on)
Remember these small things; these things will make a huge difference in understanding later on. Therefore, these are the basic data structure for store data in Pandas.
What is the Data Frame?
Data frame is a set of data element. Suppose we have a “csv” file with data of a company’s sale and using pandas we can store that csv file as data frame. For example
df = pd.read.csv("Filename.csv") in this command df is a variable called data frame which is containing a csv file.

We can also define the data frame using Pandas library. If you want to create your own Data frame than you can use pd.dataframe() function. I will explain this stuff to my coming post about Pandas.
Various operation with list and other Data types
Now here are some example of various operation we can perform on list and dictionary. These operations will help you in future to handle the providing Datasets.
Suppose if you want to select few specific columns and rows of data than how you can choose in a list or dictionary.

All same things happen with list, Dictionary and tupple.
I think it is sufficient for this post. I will back with my new post related to the PANDAS working.
Share & Care : Technology Spiritual
Comments