Python for Data Science: Part I
Python is a powerful programming language used extensively in the field of data science. It has become the go-to language for data scientists because of its simplicity, flexibility, and the availability of various data science libraries. It is one of the top programming skills sought by employers. This is a quick tutorial for Python for Data Science.
Introduction to Python
In this tutorial, we will provide a brief overview of data science and Python, guide you through the process of installing Python and required libraries, and demonstrate how to run Python code in Jupyter Notebook.
Overview of Data Science and Python
Data science is an interdisciplinary field that uses scientific methods, processes, algorithms, and systems to extract knowledge and insights from structured and unstructured data. It involves the use of statistical and machine learning techniques to gain meaningful insights from data. Python is a popular language in data science because of its simplicity, readability, and extensive library support.
Get Serawork Wallelign’s stories in your inbox
Join Medium for free to get updates from this writer.
Python has a wide range of libraries available for data science such as NumPy, Pandas, Matplotlib, and Scikit-learn. These libraries provide powerful tools for data manipulation, analysis, visualization, and machine learning. They allow data scientists to work efficiently and effectively with large datasets, making Python a preferred language in data science.
Installing Python and Required Libraries
To get started with Python for data science, you need to install Python and some required libraries. Here are the steps to follow:
Step 1: Download and Install Python
Go to the Python website and download the latest version of Python. Follow the installation instructions to install Python on your computer.
Step 2: Install Required Libraries
There are several libraries that you need to install to work with data in Python. The most commonly used libraries are NumPy, Pandas, Matplotlib, and Scikit-learn. You can install these libraries using the following command in your terminal or command prompt:
pip install numpy pandas matplotlib scikit-learnAlternatively, you can use Anaconda, which is a popular data science platform that comes with Python and all the required libraries pre-installed.
Running Python Code in Jupyter Notebook
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. It is a great tool for data scientists to write and share their work. Here are the steps to follow to run Python code in Jupyter Notebook:
Step 1: Install Jupyter Notebook
You can install Jupyter Notebook using the following command in your terminal or command prompt:
pip install jupyterStep 2: Launch Jupyter Notebook
Open your terminal or command prompt and type the following command:
jupyter notebookThis will launch the Jupyter Notebook in your default web browser.
Step 3: Create a New Notebook
Click on the “New” button on the top right corner and select “Python 3” to create a new notebook.
Step 4: Write and Run Python Code
You can now write and run Python code in the notebook. To run a code cell, click on the cell and press “Shift + Enter”. The output of the code will appear below the cell.
Conclusion
In this tutorial, we provided an overview of data science and Python, guided you through the process of installing Python and required libraries, and demonstrated how to run Python code in Jupyter Notebook. In the next tutorial, we will discuss about Python basics.






