Fundamentals of Python for Data Science

In this article we will be learning to use Python for data science. We will start with installing python, setting up a data science environment and understanding basics of python that we need during development.

Learning Objectives

  • Installation of Python
  • Setting up a conda environment
  • Installing necessary machine learning libraries
  • Reading files and manipulating data in Python
  • Work with data frames, lists and dictionaries in Python

Python Installation

To install Python on your computer, you can follow these general steps. Keep in mind that the exact steps may vary depending on your operating system:

For Windows

  1. Download Python:
    • Visit the official Python website.
    • Navigate to the “Downloads” section.
    • Choose the latest version for Windows and download the installer.
  2. Run the Installer:
    • Once the installer is downloaded, run it.
    • Make sure to check the box that says “Add Python to PATH” during installation.
    • Click “Install Now” to start the installation.
  3. Verify Installation:
    • Open a command prompt or PowerShell and type python --version to verify that Python is installed.
    • You can also open the Python IDLE (Integrated Development and Learning Environment) to interact with Python.

For Linux (Ubuntu/Debian)

  1. Open Terminal:
    • Open a terminal window.
  2. Install Python:
    • Run the following command: bash
sudo apt-get install python3
sudo apt-get update

Verify Installation: Type python3 --version in the terminal to check if Python is installed.

For MacOS

  1. Install Homebrew (optional but recommended)
    • Open Terminal
    • Install Homebrew : /bin/bash -c "$(curl -fsSL"
  2. Install Python
    • Install python by cunning command: brew install python
  3. Verify Installation
    • Type python3 --version in the terminal to check if Python is installed.

Leave a Reply

Your email address will not be published. Required fields are marked *