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

2 Multiline Commenting Ideas in Python

Here are two ways you can comment out multiple lines in python.

Python Multiline Comments

These are two popular methods Viz Backslash and Triple quote methods.

1. Backslash method

>>> s = "This is a test of the emergency broadcast system" \
… " and it will display an emergency if you put a line of
text" \
… " that is more than 80 characters on a single line"


>>> print(s)

This is a test of the emergency broadcast system and it will
display an emergency if you put a line of text that is more
than 80 characters on a single line


Split Strings

2. Triple quote method

>>> s1 = """ This is a test of the emergency broadcast
system.
… and it will display an emergency if you put a line of text
… that is more than 80 characters on a single line
… """

>>> print(s1)

This is a test of the emergency broadcast system.
and it will display an emergency if you put a line of text
that is more than 80 characters on a single line


Summary

  • You can use two methods to split the string
  • The Triple quote method is easier to use

Comments

Popular posts from this blog

SQL Query: 3 Methods for Calculating Cumulative SUM

Big Data: Top Cloud Computing Interview Questions (1 of 4)

How to Fix datetime Import Error in Python Quickly