You are on page 1of 13

Python Anaconda Tutorial : Everything You

Need To Know
 Last updated on Jul 15,202130.5K Views

Mohammad Waseem

  Bookmark

8 / 17 Blog from Introduction to Python 


Anaconda is the data science platform for data scientists, IT professionals and business
leaders of tomorrow. It is a distribution of Python, R, etc. With more than 300 packages
for data science, it becomes one of the best platforms for any project. In this python
anaconda tutorial, we will discuss how we can use anaconda for python programming.
Following are the topics discussed in this blog:

 Introduction To Anaconda
 Installation And Setup
 How To Install Python Libraries In Anaconda?
 Anaconda Navigator
 Use case 
o Python Fundamentals 
o Analytics
o Machine Learning And AI

Introduction To Anaconda
Anaconda is an open-source distribution for python and R. It is used for data
science, machine learning, deep learning, etc. With the availability of more than 300
libraries for data science, it becomes fairly optimal for any programmer to work on
anaconda for data science.
Anaconda helps in simplified package management and deployment. Anaconda comes
with a wide variety of tools to easily collect data from various sources using various
machine learning and AI algorithms. It helps in getting an easily manageable
environment setup which can deploy any project with the click of a single button.

Now that we know what anaconda is, let’s try to understand how we can install
anaconda and set up an environment to work on our systems.

Installation And Setup


To install anaconda go to https://www.anaconda.com/distribution/.
Choose a version suitable for you and click on download. Once you complete the
download, open the setup.
Follow the instructions in the setup. Don’t forget to click on add anaconda to my path
environment variable. After the installation is complete, you will get a window like shown
in the image below.
After finishing the installation, open anaconda prompt and type jupyter notebook.

You will see a window like shown in the image below.


Now that we know how to use anaconda for python lets take a look at how we can
install various libraries in anaconda for any project.

How To Install Python Libraries In Anaconda?


Open anaconda prompt and check if the library is already installed or not.

Python Certification Training Course

Explore Curriculum
Since there is no module named numpy present, we will run the following command to
install numpy.

You will get the window shown in the image once you complete the installation.
Once you have installed a library, just try to import the module again for assurance.

As you can see, there is no error that we got in the beginning, so this is how we can
install various libraries in anaconda.

Anaconda Navigator
Anaconda Navigator is a desktop GUI that comes with the anaconda distribution. It
allows us to launch applications and manage conda packages, environment and without
using command-line commands.

Use Case – Python Fundamentals


Variables And Data Types

Variables and data types are the building blocks of any programming language. Python
has 6 data types depending upon the properties they possess. List, dictionary, set,
tuple, are the collection data types in the python programming language.

Following is an example to show how variables and data types are used in python.

1
2 #variable declaration
3 name = "Edureka"
f = 1991
4
print("python was founded in"  , f)
5 #data types
6 a = [1,2,3,4,5,6,7]
7 b = {1 : 'edureka' , 2: 'python'}
8 c = (1,2,3,4,5)
d = {1,2,3,4,5}
9
print("the list is" , a)
10 print("the dictionary is" , b)
11 print("the tuple is" , c)
12 print("the set is " , d)
13
Operators

Operators in Python are used for operations between values or variables. There are 7
types of operators in python.
 Assignment Operator
 Arithmetic Operator
 Logical Operator
 Comparison Operator
 Bit-wise Operator
 Membership Operator
 Identity Operator

Following is an example with the use of a few operators in python.

1
2 a = 10
3 b = 15
4 #arithmetic operator
print(a + b)
5 print(a - b)
6 print(a * b)
7 #assignment operator
8 a += 10
9 print(a)
#comparison operator
10 #a != 10
11 #b == a
12 #logical operator
13 a > b and a > 10
#this will return true if both the statements are true.
14
15
Control Statements

Statements like if, else, break, continue are used as a control statement to gain control
over the execution for optimal results. We can use these statements in various loops in
python for controlling the outcome. Following is an example to show how we can work
with control and conditional statements.

1 name = 'edureka'
2 for i in name:
3      if i == 'a':
4          break
     else:
5          print(i)
6
Functions

Python functions provide code reusability in an efficient way, where we can write the
logic for a problem statement and run a few arguments to get the optimal solutions.
Following is an example of how we can use functions in python.

Data Science Training


DATA SCIENCE WITH PYTHON CERTIFICATION TRAINING COURSE
Data Science with Python Certification Training Course
Reviews
 5(93431)

PYTHON CERTIFICATION TRAINING COURSE


Python Certification Training Course
Reviews
 5(27991)

PYTHON MACHINE LEARNING CERTIFICATION TRAINING


Python Machine Learning Certification Training
Reviews
 5(10970)

DATA SCIENCE WITH R PROGRAMMING CERTIFICATION TRAINING COURSE


Data Science with R Programming Certification Training Course
Reviews
 5(38093)

DATA ANALYTICS WITH R CERTIFICATION TRAINING


Data Analytics with R Certification Training
Reviews
 5(24499)

STATISTICS ESSENTIALS FOR ANALYTICS


Statistics Essentials for Analytics
Reviews
 5(5862)

SAS TRAINING AND CERTIFICATION


SAS Training and Certification
Reviews
 5(4761)

ANALYTICS FOR RETAIL BANKS


Analytics for Retail Banks
Reviews
 5(1314)

DECISION TREE MODELING USING R CERTIFICATION TRAINING


Decision Tree Modeling Using R Certification Training
Reviews
 5(1631)

Next
1 def func(a):
2       return a ** a
3 res = func(10)
print(res)
4
Classes And Objects

Since python supports object-oriented programming, we can work with classes and


objects as well. Following is an example of how we can work with classes and objects in
python.

1
class Parent:
2       def func(self):
3             print('this is parent')
4  
5 class Child(Parent):
6       def func1(self):
           print('this is child')
7
8  
ob = new Child()
9 ob.func()
10
These are a few fundamental concepts in python to start with. Now talking about the
larger package support in anaconda, we can work with a lot of libraries. Let’s take a look
at how we can use python anaconda for data analytics.

You might also like