Geek Logbook

Tech sea log book

Combining Multiple CSV Files into One with Python

If you work with data, chances are you’ve encountered situations where you need to merge multiple CSV files into a single file for analysis. Manually combining these files can be time-consuming and error-prone. In this post, I’ll show you how to automate this task using Python and the powerful pandas library. Problem Statement Let’s assume

Understanding Data Layout, Files, and Tree Indexes: An Overview

In this post, we’ll explore several fundamental concepts related to data storage and indexing: Data Layout, Files, Tree Indexes, and B+ Trees. Understanding these concepts is crucial for anyone working with databases or file systems. Data Layout Data layout refers to how data is physically arranged on storage devices. This includes: Proper data layout is

Effective Knowledge Transfer of Data: Key Elements

Transferring knowledge, especially when it involves data, is a critical proces. Especially between consultants. Whether you’re transitioning to a new team, it’s crucial to get this process right. Here are five essential elements to ensure effective knowledge transfer of data: 1. Comprehensive and Clear Documentation This involves providing detailed information about the data’s origin, its

Creating Directories in Python

The os Module Python’s os module provides a way to interact with the operating system. It includes functions for creating, removing, and checking the existence of directories and files. In this tutorial, we’ll use the os.path.exists and os.makedirs functions. This module contains the necessary functions to check for the existence of a directory and create

Route Summarization and Subnetting

We will walk through the process of subnetting a network and performing route summarization using an example. Subnetting Example Let’s consider the following four subnets: Binary Representation To better understand these subnets, let’s convert the IP addresses to their binary form: Common Bits With a subnet mask of /22, we need to consider the first

50projectsIn50days – Day 31: Password Generator

A password generator is composed by a text file and some other characteristics. Besides the style and the html tags the central thing is the functions we find in script.js. First of all the simplest one the event listener in the clipboard element. The main objective of this elements is to copy the password in

Pandas Dataframe: apply method

Calculating Discounts, Taxes, and Total Amount in a DataFrame Suppose you have the following data in a DataFrame: Product Price Category 0 A 100 Electronic 1 B 200 Cloth 2 C 150 Electronic 3 D 300 Colth 4 E 250 Electronic In this DataFrame, you want to create three new columns: discount, taxes, and total_amount.

50projectsIn50days – Day 30: Auto Text Effect

In the HTML, there are simple tags that show an h1 element and an input for adjusting the text speed. The text will appear based on the function defined in the script. The function is called writeText() and it adds the text from textContent to the textElement. You can see the code in this GitHub