Posts

Showing posts with the label python-dictionary

Featured Post

14 Top Data Pipeline Key Terms Explained

Image
 Here are some key terms commonly used in data pipelines 1. Data Sources Definition: Points where data originates (e.g., databases, APIs, files, IoT devices). Examples: Relational databases (PostgreSQL, MySQL), APIs, cloud storage (S3), streaming data (Kafka), and on-premise systems. 2. Data Ingestion Definition: The process of importing or collecting raw data from various sources into a system for processing or storage. Methods: Batch ingestion, real-time/streaming ingestion. 3. Data Transformation Definition: Modifying, cleaning, or enriching data to make it usable for analysis or storage. Examples: Data cleaning (removing duplicates, fixing missing values). Data enrichment (joining with other data sources). ETL (Extract, Transform, Load). ELT (Extract, Load, Transform). 4. Data Storage Definition: Locations where data is stored after ingestion and transformation. Types: Data Lakes: Store raw, unstructured, or semi-structured data (e.g., S3, Azure Data Lake). Data Warehous...

Python Subset: How to Get Subset of Dictionary

Image
Here's a sample program to get the python subset. In this case, you'll find logic for dictionary subsets. Dictionary python To illustrate, I have taken a dictionary as below with keys and values. my_first_dict = { 'HP': 100 'IBM': 200 'NTT': 300 'ABC': 400 'GDF': 500 } I want to make a subset of values greater than 100 and less than 400. How can you achieve this? No worries, below, you will find the logic. Logic to get subset out of a dictionary I am using dictionary comprehension to achieve this. Syntax: sub_set = { key:value for key, value in my_first_dict.items() value >100 and value <400} Result References Python Programming: Using Problem-Solving Approach