Posts

Showing posts with the label List

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

How to Find Max and Min Quickly in Python List

Image
Here's logic to find Max and Min values in a List. Without using built-in Max() and Min () functions you can find Max and Min values in a List. For that matter, you need to write a user-defined function. This post is all about how to write it and run. Finding Max and Min in List You can achieve this by writing a user-defined function. Here's useful logic and steps to write it precisely. IN THIS PAGE Write a Function Execute Function Get the result Write Function You can write an user-defined function to get MAX and MIN values. In this function, I am using the max(), min() built-in functions. The other variables you can use as you wish. Below is the my actual logic. Sample Code def findmaxmin (data): ax = max (data) by = min (data) return (x,y) data = ( 109 , 98 , 88 , 7 ) (maximum, minimum) = findmaxmin (data) print ( "Maximum Marks = " , maximum) print ( "Minimum Marks = " , minimum) Created a Script Using vim editor Here as the first step, I

6 Exclusive List and Tuple Differences in Python

Image
Here're the quick differences between Tuple and List in Python. These are helpful for interviews and your project. Tuple and List differences List Comma-separated elements inside a square bracket [] make a list. The elements are indexed, which starts from '0' These you need to enclose in a single quote and separate by a comma. It can contain another list, which is called a NESTED list. Use type() function to get the type of data it is. The list is mutable (you can change the data). The objects (elements) can be of different data types.  Here're  examples on the List. Tuple The elements comma-separated and enclosed in parenthesis ()  The elements are indexed, which starts from '0' It can have heterogeneous data (integer, float, string, list, etc.) It is immutable. So you can't change the elements. Use the type() function to get the type of data it is.  Here're  examples of Tuple. List Example #Illustration of creating a list  new_list=[1, 2, 3, 4]  print(

Top Data Science Tools Complete List

Image
Top data science tools and platform providers across the world. Useful information for data science and data analytics developers. 8 Top Data Analytics Tools List. Data Science is a combination of multiple skills. AI and Machine Learning are part of data science. You can create AI and Machine Learning products with data. Related Posts Top Skills You Need for Data Science Career Data Science Sample Project an Example