Introduction to Python

Python is one of the most popular and versatile programming languages in use today. Created by Guido van Rossum and first released in 1991, Python has grown to become a cornerstone of modern software development.

What Makes Python Special?

Python is known for several key characteristics that make it an excellent choice for both beginners and experienced developers:

  1. Readability: Python’s clean syntax emphasizes readability and reduces the cost of program maintenance.

  2. Easy to Learn: With its straightforward syntax and focus on simplicity, Python is often recommended as a first programming language.

  3. Versatility: Python can be used for:

    • Web development
    • Data science and machine learning
    • Automation and scripting
    • Scientific computing
    • Artificial intelligence
    • And much more!

A Simple Example

Here’s a taste of Python’s elegant syntax:

def greet(name):
return f"Hello, {name}! Welcome to Python!"

# Using the function

message = greet("Developer")
print(message) # Output: Hello, Developer! Welcome to Python!

Why Python in 2025?

Python continues to dominate in various fields:

  • It remains the primary language for AI and machine learning
  • Its ecosystem of libraries and frameworks keeps expanding
  • The community is active and supportive
  • Major companies rely on Python for their infrastructure

Whether you’re building web applications, analyzing data, or exploring artificial intelligence, Python provides the tools and flexibility you need to bring your ideas to life.

Used Lib’s

Here are some of the most important libraries and tools used in AI and data science with Python:

Pandas

Pandas is a powerful data manipulation and analysis library for Python. It provides high-performance, easy-to-use data structures and tools for working with structured data. The library’s main features include:

  • DataFrame objects for efficient data manipulation
  • Tools for reading and writing data between various formats
  • Data alignment and integrated handling of missing data
  • Reshaping and pivoting of data sets

Anaconda

Anaconda is a distribution of Python and R programming languages specifically designed for data science and machine learning. It includes:

  • A package manager (conda) for easy library installation
  • Over 1500 pre-built Python packages
  • Environment management tools
  • Popular data science libraries pre-installed
  • GUI tools for package management

Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents containing:

  • Live code
  • Equations
  • Visualizations
  • Narrative text It’s become the de facto standard for data scientists and researchers, enabling:
  • Interactive computing and development
  • Real-time code execution and visualization
  • Markdown documentation
  • Sharing of complete data science workflows

How to install Pandas in Python

To install pandas in Python, you can use pip (Python’s package installer). Open your terminal or command prompt and run:

pip install pandas

If you’re using Python 3 specifically, you might need to use pip3:

pip3 install pandas

For virtual environment users, make sure to activate your environment first. You can verify the installation by running Python and importing pandas:

import pandas as pd
print(pd.**version**) # This will show your pandas version

Note: Some systems might require administrator privileges. In that case, use:

sudo pip install pandas # For Unix/Linux/Mac

How to Install Anaconda

You can install Anaconda by following these steps:

  1. Visit the official Anaconda website at https://www.anaconda.com/products/distribution

  2. Download the appropriate installer for your operating system:

For Windows:

# Download the Windows installer (.exe file)

# Run the .exe file and follow the installation wizard

For macOS:

# Download the macOS installer (.pkg file)

# Double click the .pkg file and follow the installation wizard

For Linux:

# Download the Linux installer (.sh file)

bash ~/Downloads/Anaconda3-20XX.XX-Linux-x86_64.sh
  1. Verify the installation by opening a terminal/command prompt and running:
conda --version
  1. Initialize Anaconda by running:
conda init

After installation, you can create and manage environments using:

# Create a new environment

conda create --name myenv python=3.9

# Activate the environment

conda activate myenv

# Install packages

conda install package_name

Note: You may need to restart your terminal after installation for all changes to take effect.

Installing Jupyter Notebook

Once you have Anaconda installed, you can install Jupyter Notebook using either of these methods:

  1. Using Anaconda (Recommended): Jupyter Notebook comes pre-installed with Anaconda. To launch it, simply run:
jupyter notebook
  1. Using pip (if you’re not using Anaconda):
pip install notebook

# Then launch it with

jupyter notebook

This will open Jupyter Notebook in your default web browser. The notebook interface will typically open at http://localhost:8888.

Some useful Jupyter Notebook keyboard shortcuts:

  • Press Shift + Enter to run a cell
  • Press B to create a new cell below
  • Press A to create a new cell above
  • Press DD (press D twice) to delete a cell

These are the libs that I’m going to use in my Master in Valencia University’s. These is a useful setup of these libs.