Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Returns a DataFrame representing the result of the given query

# Returns a DataFrame representing the result of the given query

df.createOrReplaceTempView("table1")
df2 = spark.sql("SELECT field1 AS f1, field2 as f2 from table1")
df2.collect()
# [Row(f1=1, f2='row1'), Row(f1=2, f2='row2'), Row(f1=3, f2='row3')]
Comment

PREVIOUS NEXT
Code Example
Python :: check how many days old file is python 
Python :: pandas to_csv hebrew 
Python :: python boucle for 
Python :: python float to int 
Python :: use python to download youtube playlist mp3 
Python :: how to add to beginning of linked list python 
Python :: classes in python 
Python :: How can i restrict letters after a number in an input in Python 
Python :: télécharger librairie avec pip 
Python :: python selenium element not interactable while headless 
Python :: python requests cannot find existing url 
Python :: python ascii() 
Python :: convert math equation from string to int 
Python :: python code to increase cpu utilization 
Python :: sort np list of string 
Python :: impute data by using groupby and transform 
Python :: python int to scientific string 
Python :: NumPy left_shift Syntax 
Python :: get all permutations of string 
Python :: software developer tools list 
Python :: python send email from icloud 
Python :: python docstrings example 
Python :: loading bar python 
Python :: dates and times in python 
Python :: python selenium check if browser is open 
Python :: find in python 
Python :: avoid bad request django 
Python :: python add new key to dictionary 
Python :: convert float with missing values to integer 
Python :: panda loc conditional 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =