Featured Post

8 Ways to Optimize AWS Glue Jobs in a Nutshell

Image
  Improving the performance of AWS Glue jobs involves several strategies that target different aspects of the ETL (Extract, Transform, Load) process. Here are some key practices. 1. Optimize Job Scripts Partitioning : Ensure your data is properly partitioned. Partitioning divides your data into manageable chunks, allowing parallel processing and reducing the amount of data scanned. Filtering : Apply pushdown predicates to filter data early in the ETL process, reducing the amount of data processed downstream. Compression : Use compressed file formats (e.g., Parquet, ORC) for your data sources and sinks. These formats not only reduce storage costs but also improve I/O performance. Optimize Transformations : Minimize the number of transformations and actions in your script. Combine transformations where possible and use DataFrame APIs which are optimized for performance. 2. Use Appropriate Data Formats Parquet and ORC : These columnar formats are efficient for storage and querying, signif

Python: Do While Loop Real Examples

While it is one of the loops in Python. The specialty is it never be false. You already know that in my previous post I have shared For Loop in Python. The for loop can be false.



Python: Do While Loop Real Examples

I am giving here one best example:

       
print("Help! My computer doesn't work!")
while True:
print("Does the computer make any sounds (fans, etc.)")
choice = input(" or show any lights? (y/n):")
       

In the above logic, while is always true. When in input user can give 'Y/N'.


       
if choice == 'n': # The computer does not have power
    print (" Do not show lights")
if choice == 'y': # It is power plugged in
   print ("show lights")
       
So, while is always true. Based on input the while loop works. Python is having the below list of Keywords.



Pythons Reserved Words

The Python reserved words are: and, exec, not, assert, finally, or, break, for, pass, class, form, print, continue, global, raise, def, if, return, del, import, try, elif, in, while, else, is, with, except, lambda, and yield.


Also, read

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

How to Check Kafka Available Brokers

SQL Query: 3 Methods for Calculating Cumulative SUM