filmov
tv
Spark Installation | PySpark Installation | Windows 10 / 11 | Step by Step |#spark #interview
Показать описание
In this video we will be setting up #python #java #spark #pycharm and #pyspark in our local system.
Steps :
======
1) #Java Download:
2) #Python Download: (3.11.4) :
3) #Spark Download: (3.4.2) :
5) #Pycharm community download:
Check Python , Java , PySpark and Spark Version :
========================================
python --version
java --version
spark-shell
pyspark --version
Solution :
========
Write these below two lines before the spark object creation.
-------------------------------------------------------------------------------------------------------------------------------------------------------
If we don't want to use the virtual environment python then.
add the below environment variable.
Variable Name : PYSPARK_PYTHON
if you add the PYSPARK_PYTHON variable then you will not required to set the OS environ variables in the code.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Sample Code :
============
from datetime import datetime, date
import os
import sys
Row(a=1, b=2., c='string1', d=date(2000, 1, 1), e=datetime(2000, 1, 1, 12, 0)),
Row(a=2, b=3., c='string2', d=date(2000, 2, 1), e=datetime(2000, 1, 2, 12, 0)),
Row(a=4, b=5., c='string3', d=date(2000, 3, 1), e=datetime(2000, 1, 3, 12, 0))
])
#python #leetcode #dsa #interview #sql #dataengineers #dataanalytics #datascience #StrataScratch #Facebook #data #dataengineeringinterview #codechallenge #datascientist #pyspark #CodingInterview
#dsafordataguy
Steps :
======
1) #Java Download:
2) #Python Download: (3.11.4) :
3) #Spark Download: (3.4.2) :
5) #Pycharm community download:
Check Python , Java , PySpark and Spark Version :
========================================
python --version
java --version
spark-shell
pyspark --version
Solution :
========
Write these below two lines before the spark object creation.
-------------------------------------------------------------------------------------------------------------------------------------------------------
If we don't want to use the virtual environment python then.
add the below environment variable.
Variable Name : PYSPARK_PYTHON
if you add the PYSPARK_PYTHON variable then you will not required to set the OS environ variables in the code.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Sample Code :
============
from datetime import datetime, date
import os
import sys
Row(a=1, b=2., c='string1', d=date(2000, 1, 1), e=datetime(2000, 1, 1, 12, 0)),
Row(a=2, b=3., c='string2', d=date(2000, 2, 1), e=datetime(2000, 1, 2, 12, 0)),
Row(a=4, b=5., c='string3', d=date(2000, 3, 1), e=datetime(2000, 1, 3, 12, 0))
])
#python #leetcode #dsa #interview #sql #dataengineers #dataanalytics #datascience #StrataScratch #Facebook #data #dataengineeringinterview #codechallenge #datascientist #pyspark #CodingInterview
#dsafordataguy
Комментарии