Python Dictionary Part-1

Q-1. Write a python program to Generate dictionary of numbers and their squares. Input:10 Output:{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100} Python Code: Q-2. Write a Python program to sum all the items in a dictionary. Input:{‘data_1′:5,’data_2′:6,’data_3’:7} Read more…

Python List Part-3

Q-1.Write a Python program to generate all sublists of a List. Input:[4,5,6] Output:[[], [4], [4, 5], [4, 5, 6], [5], [5, 6], [6]] Python Code: Q-2.Write a python program to find the index of element in List. Input:[5,4,3,6,8] Output:enter key:3 index is 2 Python Code: Q-3.Write a Python program to Read more…

PySpark Aggregations – Cube, Rollup

Hola 😛 Let’s get Started and dig in some essential PySpark functions. PySpark contains loads of aggregate functions to extract out the statistical information leveraging group by, cube and rolling DataFrames. Today, we’ll be checking out some aggregate functions to ease down the operations on Spark DataFrames. Before moving ahead, Read more…

Joins in PySpark

Have you ever wondered if we could apply joins on PySpark Dataframes as we do on SQL tables? Would it be possible? Woohoo!! You guessed it right. Here we have with us, a spark module called SPARK SQL for structured data processing. Spark SQL supports all kinds of SQL joins. Read more…

PySpark DataFrame Filter

Spark filter() function is used to filter rows from the dataframe based on given condition or expression. If you are familiar with SQL, then it would be much simpler for you to filter out rows according to your requirements. For example, if you wish to get a list of students Read more…

Insert math as
Additional settings
Formula color
Text color
Type math using LaTeX
Nothing to preview