Posts

Showing posts with the label Init Method

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...

How to Initialize Class Variables? The Purpose of Init Method in Python

Image
The init method is like a constructor in Java. But the usage is different in Python.  Here's the best example to write Class in Python using init method.  The init executes by default and it will initialize all the variable. The dog_1 is an instantiation of dog class. When you print the dog_1, it prints as "I am in the init method", which is from the "init" method. The self means this class. It is mandatory. Not only self, but you can also give any name in that place. Instead of "self" you can give as "This_is_Python_Self". It also will work. How to use init method class dog:    def __init__(self):          print("I am in init method") Now, instantiating the class dog_1=dog() print(dog_1) The output from the above display is as below: I am in init method <__main__.dog object at 0x7fe7b5875be0> Related posts The best Python Interview Questions