Skip to content

πŸ“š Playground and cheatsheet for learning Python. Collection of Python scripts that are split by topics and contain code examples with explanations.

Notifications You must be signed in to change notification settings

petsereypanha/python_data

Repository files navigation

Python Fundamentals - Interactive Learning Project

Table of Contents

  1. Overview
  2. Project Structure
  3. Getting Started
  4. Learning Modules
  5. Dependencies
  6. Usage
  7. Contributing
  8. Next Steps

Overview

This is a comprehensive Python learning project featuring interactive Jupyter notebooks that cover fundamental Python programming concepts. The project is organized into modular sections, each focusing on specific Python topics with hands-on exercises and practical examples.

What You'll Learn

  • Python Basics: Data types, control structures, and core programming concepts
  • Functions: Basic and advanced function concepts, parameters, and scope
  • Object-Oriented Programming: Classes, inheritance, polymorphism, and magic methods
  • Data Structures: Lists, dictionaries, collections, and nested data structures
  • File Management: Reading/writing files, CSV handling, and HTTP operations
  • Database Operations: PostgreSQL integration and database APIs
  • Data Serialization: JSON and XML processing
  • Exception Handling: Custom exceptions and error management
  • NumPy: Numerical computing and array operations
  • Pandas: Data analysis and manipulation
  • Matplotlib: Data visualization and plotting
  • Standard Library: Built-in Python modules and utilities

Project Structure

ine/
β”œβ”€β”€ README.md                           # Project documentation
β”œβ”€β”€ introduction/                       # Python basics and fundamentals
β”‚   β”œβ”€β”€ list.ipynb                     # Lists and list operations
β”‚   β”œβ”€β”€ Dictionaries.ipynb             # Dictionary data structures
β”‚   └── Loops.ipynb                    # For/while loops and iteration
β”œβ”€β”€ function/                          # Function concepts
β”‚   β”œβ”€β”€ Basic.ipynb                   # Basic function syntax and usage
β”‚   └── Advanced_Function.ipynb       # Advanced function concepts
β”œβ”€β”€ object-oriented-programming/       # OOP concepts
β”‚   β”œβ”€β”€ Introduction.ipynb            # OOP basics
β”‚   β”œβ”€β”€ Atrributes.ipynb             # Class attributes
β”‚   β”œβ”€β”€ Method.ipynb                 # Class methods
β”‚   β”œβ”€β”€ Inheritance.ipynb            # Inheritance concepts
β”‚   β”œβ”€β”€ Polymorphism.ipynb           # Polymorphism examples
β”‚   β”œβ”€β”€ Super_and_Overriding.ipynb   # Method overriding
β”‚   β”œβ”€β”€ Magic_Methods.ipynb          # Special methods
β”‚   └── Getattr_Setattr_Hasattr.ipynb # Attribute manipulation
β”œβ”€β”€ collection/                        # Advanced data structures
β”‚   └── Nested Collections.ipynb      # Working with nested collections
β”œβ”€β”€ file-management-and-http/          # File and web operations
β”‚   β”œβ”€β”€ Intro to File Management.ipynb
β”‚   β”œβ”€β”€ Intro to Files (Cheatsheet).ipynb
β”‚   β”œβ”€β”€ Writing_Files.ipynb
β”‚   β”œβ”€β”€ The with context manager.ipynb
β”‚   β”œβ”€β”€ CSV Old School.ipynb
β”‚   β”œβ”€β”€ HTTP Practice.ipynb
β”‚   β”œβ”€β”€ alice.txt                     # Sample text file
β”‚   └── products.csv                  # Sample CSV data
β”œβ”€β”€ database/                          # Database operations
β”‚   └── pg/                           # PostgreSQL examples
β”‚       β”œβ”€β”€ DB-API.ipynb
β”‚       β”œβ”€β”€ Adapters.ipynb
β”‚       β”œβ”€β”€ Admin-Tools.ipynb
β”‚       └── DDL.ipynb
β”œβ”€β”€ serialization/                     # Data serialization
β”‚   β”œβ”€β”€ Data - Serialization.ipynb    # JSON serialization
β”‚   β”œβ”€β”€ XML - Serialization.ipynb     # XML processing
β”‚   └── data/                         # Sample data files
β”‚       β”œβ”€β”€ data.json
β”‚       β”œβ”€β”€ movie.csv
β”‚       β”œβ”€β”€ movie.txt
β”‚       └── quran.xml
β”œβ”€β”€ exceptions/                        # Error handling
β”‚   └── Custom Exceptions.ipynb       # Custom exception classes
β”œβ”€β”€ numpy/                            # Numerical computing
β”‚   └── Introduction.ipynb            # NumPy arrays and operations
β”œβ”€β”€ pandas/                           # Data analysis and manipulation
β”‚   β”œβ”€β”€ introduction.ipynb            # Getting started with pandas
β”‚   β”œβ”€β”€ Analys.ipynb                 # Data analysis examples
β”‚   β”œβ”€β”€ Plot_Analsis.ipynb           # Data visualization with pandas
β”‚   └── data/
β”‚       β”œβ”€β”€ bestsellers.csv          # Amazon bestsellers dataset
β”‚       β”œβ”€β”€ cars.csv                 # Car data for analysis
β”‚       └── invoices.csv              # Sample invoice data
β”œβ”€β”€ Matplotlib/                       # Data visualization
β”‚   └── introduction.ipynb            # Plotting and visualization basics
β”œβ”€β”€ module/                           # Python modules
β”‚   └── modules.py                    # Module examples
└── standard_library/                 # Python standard library usage

Getting Started

Prerequisites

  • Python 3.7+ installed on your system
  • Jupyter Notebook or JupyterLab
  • Basic understanding of programming concepts (helpful but not required)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd ine
  2. Create a virtual environment (recommended)

    # Using conda
    conda create -n python-fundamentals python=3.9
    conda activate python-fundamentals
    
    # Or using venv
    python -m venv python-fundamentals
    source python-fundamentals/bin/activate  # On Windows: python-fundamentals\Scripts\activate
  3. Install required packages

    pip install jupyter pandas matplotlib seaborn numpy psycopg2-binary requests
  4. Launch Jupyter Notebook

    jupyter notebook
    # or
    jupyter lab

Learning Modules

1. Introduction (Start Here)

Begin with the introduction/ folder to learn Python basics:

  • Lists: Understanding list data structures and operations
  • Dictionaries: Key-value pairs and dictionary methods
  • Loops: Iteration and control flow

2. Functions

Explore function/ to understand:

  • Basic function syntax and parameters
  • Advanced concepts like *args, **kwargs
  • Scope and local/global variables

3. Object-Oriented Programming

The object-oriented-programming/ section covers:

  • Class creation and instantiation
  • Attributes and methods
  • Inheritance and polymorphism
  • Special methods (magic methods)

4. Data Structures & Collections

Learn advanced data manipulation:

  • Collections: Working with nested data structures
  • File Management: Reading and writing files
  • Serialization: JSON and XML processing

5. Scientific Computing & Data Analysis

Dive into numerical computing and data science:

  • NumPy: Array operations and numerical computing
  • Pandas: Data manipulation, analysis, and cleaning
  • Matplotlib: Creating plots and visualizations

6. Advanced Topics

  • Database Operations: PostgreSQL integration with DB-API
  • Exception Handling: Custom error management
  • HTTP Operations: Web requests and APIs
  • Standard Library: Built-in Python modules

Dependencies

jupyter>=1.0.0
pandas>=1.3.0
matplotlib>=3.5.0
seaborn>=0.11.0
numpy>=1.21.0
psycopg2-binary>=2.9.0
requests>=2.25.0

Usage

Running Individual Notebooks

  1. Navigate to the desired module folder
  2. Open the corresponding .ipynb file in Jupyter
  3. Run cells sequentially using Shift + Enter
  4. Complete exercises and experiment with the code

Recommended Learning Path

  1. Start with introduction/ - Python basics (lists, dictionaries, loops)
  2. Progress to function/ - Function concepts and advanced features
  3. Move to object-oriented-programming/ - OOP principles and implementation
  4. Explore collection/ - Advanced data structures
  5. Practice with file-management-and-http/ - File operations and web requests
  6. Learn numpy/ - Numerical computing fundamentals
  7. Advance to pandas/ - Data analysis and manipulation
  8. Visualize with Matplotlib/ - Creating plots and charts
  9. Experiment with specialized topics - databases, serialization, exceptions

Working with Sample Data

The project includes various sample datasets:

  • pandas/data/bestsellers.csv - Amazon bestsellers for analysis practice
  • pandas/data/cars.csv - Car data for basic operations
  • pandas/data/invoices.csv - Invoice data for business analytics
  • file-management-and-http/products.csv - Product data for file operations
  • file-management-and-http/alice.txt - Text file for reading exercises
  • serialization/data/ - Various formats (JSON, CSV, XML) for serialization practice

Contributing

This is a learning project, but contributions are welcome! Here's how you can help:

Adding New Content

  1. Fork the repository
  2. Create a new branch for your feature
  3. Add new notebooks following the existing structure
  4. Include clear explanations and practical examples
  5. Test all code cells to ensure they run without errors
  6. Submit a pull request with a description of your additions

Improving Existing Content

  • Fix typos or unclear explanations
  • Add more examples or exercises
  • Improve code comments and documentation
  • Suggest better learning progressions
  • Add more sample datasets

Guidelines

  • Keep notebooks focused on specific topics
  • Include markdown cells with clear explanations
  • Provide practical, runnable examples
  • Add sample data when helpful
  • Follow consistent naming conventions
  • Ensure code works with the specified dependencies

Next Steps

After completing this fundamental course, consider exploring:

Advanced Python Topics

  • Decorators and context managers
  • Generators and iterators
  • Asyncio and concurrent programming
  • Testing with pytest
  • Package development and distribution

Data Science Specialization

  • Advanced pandas operations (groupby, pivot tables, time series)
  • Statistical analysis with SciPy
  • Machine learning with Scikit-learn
  • Deep learning with TensorFlow or PyTorch
  • Data visualization with Plotly and Bokeh

Web Development

  • Flask or Django frameworks
  • REST API development
  • Database design and management
  • Frontend integration with JavaScript

Specialized Applications

  • Financial analysis and quantitative finance
  • Bioinformatics and computational biology
  • Image processing with OpenCV
  • Natural language processing with NLTK/spaCy
  • Automation and scripting

Resources for Continued Learning


Happy Learning! 🐍

Remember: Programming is best learned by doing. Don't just read the codeβ€”run it, modify it, and experiment with it. Each notebook is designed to be interactive, so make the most of the hands-on exercises!

About

πŸ“š Playground and cheatsheet for learning Python. Collection of Python scripts that are split by topics and contain code examples with explanations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published